GNU Stow Symlink farm manager
Light · Postcard
102 × 152 mm · PDF
Dark · Postcard
102 × 152 mm · PDF
Ink saver · Postcard
102 × 152 mm · PDF
Light · A4 landscape
297 × 210 mm · PDF
Dark · A4 landscape
297 × 210 mm · PDF
Ink saver · A4 landscape
297 × 210 mm · PDF
Light · A3 landscape
420 × 297 mm · PDF
Dark · A3 landscape
420 × 297 mm · PDF
Ink saver · A3 landscape
420 × 297 mm · PDF
Start here
stow <pkg>
stow -n -v <pkg>
stow -t ~ <pkg>
stow -D <pkg>
stow -R <pkg>
stow -d <dir> <pkg>
stow --adopt <pkg>
stow --dotfiles <pkg>
Concepts
- Stow dir ~/dotfiles
- Package vim/.vimrc
- Target dir ~/.vimrc
Stow and unstow
stow <pkg>...
stow -S <pkg>
stow -D <pkg>
stow -R <pkg>
stow -n <pkg>
stow -v <pkg>
stow --verbose=<n> <pkg>
stow -D <old> -S <new>
Directories
stow -d <dir> <pkg>
stow -t <dir> <pkg>
stow -t ~ <pkg>
STOW_DIR=<dir> stow <pkg>
stow --dir=<dir> --target=<dir>
<pkg>
Dotfiles and conflicts
stow --dotfiles <pkg>
stow --adopt <pkg>
stow --no-folding <pkg>
stow --override=<regex> <pkg>
stow --defer=<regex> <pkg>
Ignoring and config
stow --ignore=<regex> <pkg>
~/.stowrc./.stowrc.stow-local-ignore
~/.stow-global-ignore
stow -Vstow -hTree folding
| Situation | Result |
|---|---|
Target dir missing |
One symlink to the whole directory |
Target dir already real |
Links go inside it, file by file |
Second package needs folded dir |
Symlink split into real dir, both linked |
Package removed, one left |
Directory refolded to one symlink |
--no-folding |
Always file-level links |
Recipes
mkdir -p ~/dotfiles/vimmv ~/.vimrc ~/dotfiles/vim/.vimrccd ~/dotfiles && stow -nv vimstow vim
git clone <url> ~/dotfilescd ~/dotfilesstow -nv bash vim git # check conflictsstow bash vim git
cd ~/dotfiles && git status # must be cleanstow --adopt vimgit diff # see what was adoptedgit checkout . # keep repo version
cd /usr/local/stowsudo stow -v <pkg-1.0>sudo stow -D <pkg-1.0>



