GNU Stow

2014/09/28

As my friendship with GitHub grows stronger, I have an increasing number of Git repositories containing executable files.

As I don’t want my PATH to include all these folders, I have started using GNU Stow to manage the programs.

My GitHub repositories are kept in the folder

~/Documents/GitHub

and stow is used to make symlinks to the folder ~/bin. To symlink files from the folder ~/Documents/GitHub/foo I use the command

stow --dir=/home/robert/Documents/GitHub --target=/home/robert/bin foo

Notice that I’ve written the full paths to both the “stow directory” (GitHub) and the target directory (bin); stow does not expand the ~.

To avoid having to type the --dir and --target their standard values can be set in ~/.stowrc.

There are two flags for stow that I find useful for testing, namely -n and -v (possibly with more v’s): These increase verbosity and run the command in testing mode.

>> Home