Sitemap

How to Sync your dotfiles across different machines. Mac to Windows to Linux

4 min readMay 14, 2024
Press enter or click to view image in full size

I recently went back to using VIM and took the time to do a deep dive on my dotfiles. I had configured the perfect Neovim setup on my work MacBook, but when I switched to my desktop Windows machine, I found that my new shortcuts, theme, and plugins were missing!

In order to Sync these configurations manually, requires locating all necessary files (e.g., ~/.zshrc, ~/.config/nvim), copying them to a new folder, uploading them to GitHub, pulling them onto the other machine, and pasting them into the correct locations. This is where Chezmoi comes in handy!

Syncing with Chezmoi

chezmoi is an easy to use CLI for managing your dotfiles or any other configuration file you would like to sync across multiple devices. You can add your files or directories to chezmoi to manage and

install chezmoi (I prefer homebrew for mac/linux)

$ brew install chezmoi

initialize

$ chezmoi init

add the dotfiles you want to sync.

$ chezmoi add ~/.zshrc

$ chezmoi add ~/.oh-my-zsh

$ chezmoi add ~/.config/nvim

$ chezmoi add ~/.config/karabiner

--

--

Lukas Sorensen

Written by Lukas Sorensen

Full Stack Web Dev from the Midwest. 10 years experience building enterprise SPAs using modern Javascript and Typescript

No responses yet