$linuxjunkies
>

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.

UbuntuDebianFedoraArch

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

FlagWhat it does
-d DIR, --dir=DIRSet the stow directory (default: current directory)
-t TARGET, --target=TARGETSet the target directory (default: parent of stow directory)
-S, --stowCreate symlinks (default action)
-D, --deleteRemove symlinks created by stow
-R, --restowDelete then re-create symlinks (useful for updates)
-n, --noSimulate the operation without making changes (dry-run)
-v, --verboseIncrease verbosity; show actions being performed
--adoptMove existing files into the package directory before creating symlinks
--ignore=REGEXIgnore files matching the regular expression when stowing
-p, --print-foreignShow 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 vim

Stow both 'emacs' and 'zsh' packages from ~/packages directory into home directory

stow -d ~/packages -t ~ emacs zsh

Dry-run mode: show what stow would do without making actual changes

stow -n vim

Delete (unstow) symlinks created by the 'vim' package

stow -D vim

Restow the 'vim' package by removing and recreating all its symlinks

stow -R vim

Verbosely stow multiple dotfile packages from ~/dotfiles into home directory

stow -v -d ~/dotfiles -t ~ bash zsh git

Dry-run stowing vim while ignoring README and LICENSE files

stow -n --ignore='README|LICENSE' vim

Move existing vim files into the vim package directory before creating symlinks

stow --adopt vim

Related commands