stow(1)
Stow is a symlink farm manager that deploys software packages into a target directory by creating symbolic links to files in package directories.
Synopsis
stow [OPTION]... PACKAGE... [-d DIR] [-t TARGET]Description
Stow manages the installation of software by creating a tree of symbolic links from a target directory to files in package directories. This is useful for managing multiple software versions or organizing dotfiles without duplicating files across your system.
By default, stow reads packages from subdirectories of the current directory (or a directory specified with -d) and creates symlinks in the parent directory (or a target specified with -t). Each package is a directory tree mirroring the desired final directory structure.
Stow is commonly used for managing configuration files (dotfiles), multiple software installations, or maintaining a clean separation between packages while presenting a unified view to the system.
Common options
| Flag | What it does |
|---|---|
-d DIR, --dir=DIR | Set the stow directory (default: current directory) |
-t TARGET, --target=TARGET | Set the target directory (default: parent of stow directory) |
-S, --stow | Create symlinks (default action) |
-D, --delete | Remove symlinks created by stow |
-R, --restow | Delete then re-create symlinks (useful for updates) |
-n, --no | Simulate the operation without making changes (dry-run) |
-v, --verbose | Increase verbosity; show actions being performed |
--adopt | Move existing files into the package directory before creating symlinks |
--ignore=REGEX | Ignore files matching the regular expression when stowing |
-p, --print-foreign | Show conflicts with files not managed by stow |
Examples
Create symlinks for the 'vim' package in the current stow directory to the parent target directory
stow vimStow both 'emacs' and 'zsh' packages from ~/packages directory into home directory
stow -d ~/packages -t ~ emacs zshDry-run mode: show what stow would do without making actual changes
stow -n vimDelete (unstow) symlinks created by the 'vim' package
stow -D vimRestow the 'vim' package by removing and recreating all its symlinks
stow -R vimVerbosely stow multiple dotfile packages from ~/dotfiles into home directory
stow -v -d ~/dotfiles -t ~ bash zsh gitDry-run stowing vim while ignoring README and LICENSE files
stow -n --ignore='README|LICENSE' vimMove existing vim files into the vim package directory before creating symlinks
stow --adopt vim