Skip to content

Dotfiles

By Brian Sunter

Posted in Programming

What are dotfiles?

There are a number of important programs like your terminal, emacs, and vim which are configured by files starting with a dot (.zshrc) in your home directory.

How to manage dotfiles

Instead of editing your dotfiles in your home directory, I recommend creating a git repo and symlinking the files into your home directory. I create a .dotfiles folder in my home directory and use GNU stow to symlink the files in my home directory.

GNU stow

GNU stow is strictly a symlink manager. It has a folder structure convention that allows you to create symlinks in the folder above it. If I run stow it will create symlinks in the directory above where stow was run. There are other tools that do more complicated things, but this works for me and is simple to understand.

/Users/bsunter/.dotfiles
├── .gitmodules
├── Brewfile
├── README.md
├── emacs
│ ├── .emacs.d
│ └── .spacemacs
├── git
│ └── .gitconfig
├── iterm
│ └── ItermProfile.json
├── macos
│ └── bootstrap.sh
├── manage.sh
├── vim
│ └── .vimrc
└── zsh
├── .stow-local-ignore
├── .zshrc
└── lib

Getting the dotfiles

To start using my dotfiles, you just need to run a few commands.

git clone --recursive git@github.com:briansunter/dotfiles.git ~/.dotfiles

cd ~/.dotfiles

./manage.sh bootstrap

This will setup the dotfiles, install brew, and the apps from the brewfile. My Dotfiles Github Repo

Brian Sunter
Brian Sunter

I've spent all my life on top of a mountain, learning the way of the Ninja Dev.