---
title: "Terminal: Manage Dotfiles with Stow"
description: "Notice: This is a little \"terminal treat\" – a short tip rather than a whole article. Enjoy!"
date: 2025-04-27
canonical_url: "https://christofersandin.com/texts/terminal-stow"
section: "Texts"
---

#  Terminal: Manage Dotfiles with Stow 

**Notice: This is a little "terminal treat" – a short tip rather than a whole article. Enjoy!**

**If you have started reading this introduction, I assume you have a repository with your config files somewhere. Otherwise, I can’t figure out what piqued your interest. Since people spend years tweaking, personalizing, and modifying them to adapt to their preferred way of working, you might as well manage them with the same skill. Meet Stow.**

Install *[Stow](https://www.gnu.org/software/stow/)* via `brew install stow` and then clone that repo into `~/dotfiles`. The main idea is to use Stow to create symbolic links from these files into your home directory. You could create the symlinks by hand, but Stow automates it.

Here is my current setup:

```shell
~/dotfiles (main*) » tree
.
├── aerospace
├── btop
├── editorconfig
├── eslint
├── eza
├── glow
├── helix
├── ideavim
├── neofetch
├── npm
├── nvim
├── prettier
├── README.md
├── stylelint
├── tmux
├── vim
├── wezterm
├── wtf
├── yazi
└── zsh

```

Here’s how my directory setup looks for `~/dotfiles/nvim` and how I organized the folder structure under that folder to mimic where I want the files to end up in my home directory.

(You can imagine that the first folder `~/dotfiles/nvim`, which represents the application’s name, also symbolizes the `~` directory when placing files.)

```
~/dotfiles (main*) » tree -a nvim
nvim
└── .config
    └── nvim
        ├── init.lua
        ├── lazy-lock.json
        └── lua
            ├── .luarc.json
            ├── keymaps.lua
            ├── options.lua
            ├── plugins
            │   ├── alpha.lua
            │   ├── auto-indent.lua
            │   ├── colors.lua
            │   ├── comments.lua
            │   ├── completions.lua
            │   ├── formatting.lua
            │   ├── git.lua
            │   ├── linting.lua
            │   ├── lsp-config.lua
            │   ├── lualine.lua
            │   ├── markdown.lua
            │   ├── neo-tree.lua.NOT-IN-USE
            │   ├── noice.lua
            │   ├── none-ls.lua.NOT-IN-USE
            │   ├── nvim-tmux-navigation.lua
            │   ├── oil.lua
            │   ├── telescope.lua
            │   ├── theme.lua
            │   ├── treesitter-textobjects.lua
            │   ├── treesitter.lua
            │   └── which-key.lua
            └── plugins.lua

```

Then, use `stow` to symlink files into `~` with `stow nvim`

To verify, let’s look at how the file system looks after this. Running `tree -a .config/nvim` gives us the [tree structure of the directory](https://formulae.brew.sh/formula/tree):

```shell
~ » tree -a .config/nvim
.config/nvim
├── init.lua
├── lazy-lock.json
└── lua
    ├── .luarc.json
    ├── keymaps.lua
    ├── options.lua
    ├── plugins
    │   ├── alpha.lua
    │   ├── auto-indent.lua
    │   ├── colors.lua
    │   ├── comments.lua
    │   ├── completions.lua
    │   ├── formatting.lua
    │   ├── git.lua
    │   ├── linting.lua
    │   ├── lsp-config.lua
    │   ├── lualine.lua
    │   ├── markdown.lua
    │   ├── neo-tree.lua.NOT-IN-USE
    │   ├── noice.lua
    │   ├── none-ls.lua.NOT-IN-USE
    │   ├── nvim-tmux-navigation.lua
    │   ├── oil.lua
    │   ├── telescope.lua
    │   ├── theme.lua
    │   ├── treesitter-textobjects.lua
    │   ├── treesitter.lua
    │   └── which-key.lua
    └── plugins.lua

```

Then, pick and choose which ones you like. Stow uses the same name as the folders you have in your repository:

- `stow zsh`
- `stow nvim`
- `stow wezterm`
- …

This works well for me, and I do not have any more requirements for a solution like this. However, there are other, more complex solutions to the same problem, so feel free to explore other options if this seems a bit rudimentary for your taste.

---

## References

- [GNU Stow](https://www.gnu.org/software/stow/)
- [Never lose dotfiles again with GNU Stow](https://youtu.be/NoFiYOqnC4o?si=aIsCZNxGOM4o418I)
- [Stow has forever changed the way I manage my dotfiles](https://www.youtube.com/watch?v=y6XCebnB9gs)
- [Using GNU Stow to manage your dotfiles](https://brandon.invergo.net/news/2012-05-26-using-gnu-stow-to-manage-your-dotfiles.html) by Brandon Invergo – the post that popularized the technique
- [Using GNU Stow to Manage Symbolic Links for Your Dotfiles](https://systemcrafters.net/managing-your-dotfiles/using-gnu-stow/) by System Crafters
- [Managing dotfiles with GNU Stow](https://venthur.de/2021-12-19-managing-dotfiles-with-stow.html) by Bastian Venthur
- [GitHub does dotfiles](https://dotfiles.github.io/) – tutorials, utilities, and example repos

---

## Metadata

  [\#terminal-treats](/writing/terminal-treats)

 Published .  
 Last modified .

 1 9 9 509
