This guide provides instructions on how to use GNU Stow for managing your dotfiles. Stow is a symlink farm manager that makes it easy to manage project installations in your home directory.
Use Homebrew to install Stow:
brew install stow
Use APT to install Stow:
sudo apt-get update && sudo apt-get install stow
git git@github.com:tku137/dotfiles.git ~/dotfiles
cd ~/dotfiles
Navigate to the dotfiles directory and use Stow to symlink the dotfiles to the home directory.
cd ~/dotfiles
stow folder_name
Replace folder_name
with the name of the folder containing the dotfiles you want to manage.
For example, to stow fish
and starship
configuration, call:
cd ~/dotfiles
stow fish starship
- To symlink files/folders:
stow folder_name
- To remove symlinks:
stow -D folder_name
- To restow (useful for updating symlinks):
stow -R folder_name
The --adopt
flag is used to tell Stow to adopt existing files into the Stow package. This means that if a file already exists in the target location, Stow will move it into the Stow package directory and create a symlink in its place.
Use with caution, as this will move the existing files into the Stow directory.
stow --adopt folder_name