<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Terminal |</title><link>https://example.com/tags/terminal/</link><atom:link href="https://example.com/tags/terminal/index.xml" rel="self" type="application/rss+xml"/><description>Terminal</description><generator>HugoBlox Kit (https://hugoblox.com)</generator><language>en-us</language><lastBuildDate>Tue, 17 Feb 2026 00:00:00 +0000</lastBuildDate><image><url>https://example.com/media/icon_hu_702a800cd775dbac.png</url><title>Terminal</title><link>https://example.com/tags/terminal/</link></image><item><title>Mastering Dotfiles: A Guide to GNU Stow</title><link>https://example.com/blog/stow-guide/</link><pubDate>Tue, 17 Feb 2026 00:00:00 +0000</pubDate><guid>https://example.com/blog/stow-guide/</guid><description>&lt;p&gt;Across all the years that I had to resintall Linux; like when i broke stuff irreparably and had to reinstall, when I tried out many distros, never deciding whether I want dual boot with Windows or straight up Linux and swithicing constantly; I have always struggled with remembering all my specific aliases, configurations and functions.&lt;/p&gt;
&lt;p&gt;After the third time of having to do this I wised up and created my first &lt;em&gt;dotfiles&lt;/em&gt; repository to track my configuration, yet I still had to clone this repository and manually replace each default configuration file for mine. This can be straightforward for a couple of files but when you reach 5+ or even if you have specific configuration set for applications like &lt;em&gt;Terminator&lt;/em&gt; or &lt;em&gt;Cursor&lt;/em&gt; this becomes a nightmare.&lt;/p&gt;
&lt;p&gt;Today, I am sharing a complete beginner’s guide on how I manage my environment using &lt;strong&gt;GNU Stow&lt;/strong&gt;, a symlink farm manager that turns a messy home directory into a version-controlled masterpiece.&lt;/p&gt;
&lt;p&gt;This guide explains everything from installing Stow to understanding directory structures and actually linking your dotfiles. No prior experience with Stow or symlinks is assumed.&lt;/p&gt;
&lt;h3 id="check-the-github-repository"&gt;&lt;em&gt;Check the github repository &amp;ndash;&amp;gt;
&lt;/em&gt;&lt;/h3&gt;
&lt;hr&gt;
&lt;h2 id="1-what-are-dotfiles-and-why-use-stow"&gt;1. What are dotfiles and why use Stow?&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Dotfiles&lt;/strong&gt; are configuration files whose names usually start with a dot (e.g. &lt;code&gt;.zshrc&lt;/code&gt;, &lt;code&gt;.gitconfig&lt;/code&gt;). They live in your &lt;strong&gt;home directory&lt;/strong&gt; (&lt;code&gt;~&lt;/code&gt; or &lt;code&gt;/home/yourname&lt;/code&gt; on Linux, &lt;code&gt;/Users/yourname&lt;/code&gt; on macOS). Programs read them to customize your shell, Git, editor, etc.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The problem:&lt;/strong&gt; Dotfiles are scattered in &lt;code&gt;~&lt;/code&gt;. Backing them up, moving them to a new machine, or sharing them is messy if you copy files by hand.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What Stow does:&lt;/strong&gt; Stow creates &lt;strong&gt;symlinks&lt;/strong&gt; (shortcuts) in your home directory that point into a single folder. So:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Your “real” config files live in &lt;strong&gt;one place&lt;/strong&gt; (e.g. &lt;code&gt;~/Stow-Guide&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;In your home directory you only see &lt;strong&gt;links&lt;/strong&gt; that point into that place.&lt;/li&gt;
&lt;li&gt;Edit the file in the repo → the link in &lt;code&gt;~&lt;/code&gt; “sees” the same file. Backup the repo (e.g. with Git) and you’ve backed up all your dotfiles.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;GNU Stow&lt;/strong&gt; is the program that creates and removes those links in a consistent way (all of the grains of sand in the planet earth wouldn&amp;rsquo;t be enough to count how many times I&amp;rsquo;ve messed up a
and lost all data). You run it from a directory that contains one folder per “package” (e.g. shell, git, vim). Stow then links the &lt;em&gt;contents&lt;/em&gt; of each package into a target directory (here: your home &lt;code&gt;~&lt;/code&gt;).&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="2-what-is-a-symlink"&gt;2. What is a symlink&lt;/h2&gt;
&lt;p&gt;A &lt;strong&gt;symlink&lt;/strong&gt; (symbolic link) is a special file that acts like a pointer to another file or folder. When a program opens &lt;code&gt;~/.zshrc&lt;/code&gt;, the system follows the pointer and reads the file it points to (e.g. the one inside your dotfiles repo).&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;You&lt;/strong&gt; edit the file in the repo; the link in &lt;code&gt;~&lt;/code&gt; always “shows” that same file.&lt;/li&gt;
&lt;li&gt;Deleting the &lt;strong&gt;link&lt;/strong&gt; only removes the pointer, not the real file in the repo.&lt;/li&gt;
&lt;li&gt;Stow creates these links for you so the layout in &lt;code&gt;~&lt;/code&gt; matches what programs expect (e.g. &lt;code&gt;~/.zshrc&lt;/code&gt;, &lt;code&gt;~/.config/Cursor/...&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id="3-installing-gnu-stow"&gt;3. Installing GNU Stow&lt;/h2&gt;
&lt;p&gt;You need Stow installed before you can run any &lt;code&gt;stow&lt;/code&gt; commands.&lt;/p&gt;
&lt;h3 id="linux-debian--ubuntu--similar"&gt;Linux (Debian / Ubuntu / similar)&lt;/h3&gt;
&lt;p&gt;Open a terminal and run:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo apt update
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sudo apt install stow
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Enter your password when asked. When it finishes, check that it worked:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;stow --version
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You should see a version number (e.g. &lt;code&gt;stow (GNU Stow) version 2.3.1&lt;/code&gt;).&lt;/p&gt;
&lt;h3 id="macos"&gt;macOS&lt;/h3&gt;
&lt;p&gt;If you use Homebrew:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;brew install stow
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;stow --version
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="other-systems"&gt;Other systems&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Fedora / RHEL:&lt;/strong&gt; &lt;code&gt;sudo dnf install stow&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Arch:&lt;/strong&gt; &lt;code&gt;sudo pacman -S stow&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;FreeBSD:&lt;/strong&gt; &lt;code&gt;pkg install stow&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If your OS isn’t listed, search for “install GNU Stow” plus your distro name.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="4-where-things-live-in-this-repo"&gt;4. Where things live in this repo&lt;/h2&gt;
&lt;p&gt;With &lt;strong&gt;Stow&lt;/strong&gt;, you can have whatever folder structure you want inside your tracked repository. This allows you to maintain several different configurations that you can quickly test out to see if you like them.&lt;/p&gt;
&lt;p&gt;As an example, I share my current configuration below.&lt;/p&gt;
&lt;p&gt;My
has a &lt;strong&gt;root directory&lt;/strong&gt; (the folder you get when you clone it). Inside that:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;README.md&lt;/code&gt;&lt;/strong&gt; — Short overview and reference.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;STOW-BEGINNER-GUIDE.md&lt;/code&gt;&lt;/strong&gt; — The original file this post is based on.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;backups/&lt;/code&gt;&lt;/strong&gt; — Contains two different things:
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;backups/stow/&lt;/code&gt;&lt;/strong&gt; — This is the directory that holds all &lt;strong&gt;Stow packages&lt;/strong&gt;. You will run the &lt;code&gt;stow&lt;/code&gt; command from inside &lt;code&gt;backups/stow/&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;backups/periodic-backup/&lt;/code&gt;&lt;/strong&gt; — Other backup data (e.g. crontabs). Not used by Stow for linking dotfiles.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Stow packages&lt;/strong&gt; = everything that Stow will link into your home = the &lt;strong&gt;direct subfolders&lt;/strong&gt; of &lt;strong&gt;&lt;code&gt;backups/stow/&lt;/code&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Each of those subfolders is one &lt;strong&gt;package&lt;/strong&gt; (e.g. &lt;code&gt;shell&lt;/code&gt;, &lt;code&gt;git&lt;/code&gt;, &lt;code&gt;vim&lt;/code&gt;). The &lt;strong&gt;names&lt;/strong&gt; of those folders are what you pass to &lt;code&gt;stow&lt;/code&gt; (e.g. &lt;code&gt;stow -vSt ~ shell&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Folder layout (simplified):&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Stow-Guide/ ← repo root (e.g. ~/Stow-Guide)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;├── README.md
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;├── STOW-BEGINNER-GUIDE.md
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;├── backups/
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;│ ├── stow/ ← run &amp;#34;stow&amp;#34; from here
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;│ │ ├── shell/ ← package &amp;#34;shell&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;│ │ ├── git/ ← package &amp;#34;git&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;│ │ ├── vim/ ← package &amp;#34;vim&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;│ │ ├── ssh/
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;│ │ ├── input/
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;│ │ ├── cursor/
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;│ │ ├── terminator/
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;│ │ ├── bin/
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;│ │ ├── backups/
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;│ │ └── Templates/
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;│ └── periodic-backup/ ← not used by stow for ~
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="why-backupsstow"&gt;&lt;strong&gt;Why “backups/stow”?&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;MY repo was set up so that the actual Stow packages live under &lt;code&gt;backups/stow/&lt;/code&gt;. The important part is: **you must run &lt;code&gt;stow&lt;/code&gt; from inside &lt;code&gt;backups/stow/**&lt;/code&gt; (or pass that path to Stow). The rest of the repo stays out of the way of Stow.&lt;/p&gt;
&lt;h2 id="5-how-the-folder-structure-becomes-your-home-directory"&gt;5. How the folder structure becomes your home directory&lt;/h2&gt;
&lt;p&gt;Stow does &lt;strong&gt;not&lt;/strong&gt; link the package folder itself. It links the &lt;strong&gt;contents&lt;/strong&gt; of each package so that the paths inside the package mirror your home directory.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Rule:&lt;/strong&gt; Everything inside a package folder is placed under the &lt;strong&gt;target&lt;/strong&gt; (here: &lt;code&gt;~&lt;/code&gt;) with the same path.&lt;/p&gt;
&lt;h3 id="example-shell-package"&gt;Example: &lt;code&gt;shell&lt;/code&gt; package&lt;/h3&gt;
&lt;p&gt;This package contains configuration files for various shells (Bash, Zsh, Fish). Note how it handles both files in the root and nested directories.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Folder structure inside &lt;code&gt;backups/stow/shell/&lt;/code&gt;:&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;shell/
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;├── .config
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;│ └── config.fish
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;├── .oh-my-zsh/themes
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;│ └── themes
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;│ └── afowler.zsh-theme
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;├── .aliases
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;├── .bash_profile
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;├── .bash_prompt
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;├── .bashrc
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;├── .functions
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;├── .functions.fish
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;├── .git-repos-globally.txt
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;├── .profile
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;└── .zshrc
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To install this package, you run the following command from inside &lt;code&gt;backups/stow/&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;stow -vSt ~ shell
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;strong&gt;What happens:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Stow mirrors the structure found inside &lt;code&gt;shell/&lt;/code&gt; directly to your home directory (&lt;code&gt;~&lt;/code&gt;):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;~/.zshrc&lt;/code&gt; → symlink to &lt;code&gt;…/backups/stow/shell/.zshrc&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;~/.bashrc&lt;/code&gt; → symlink to &lt;code&gt;…/backups/stow/shell/.bashrc&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;~/.config/config.fish&lt;/code&gt; → symlink to &lt;code&gt;…/backups/stow/shell/.config/config.fish&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;~/.oh-my-zsh/themes/afowler.zsh-theme&lt;/code&gt; → symlink to &lt;code&gt;…/backups/stow/shell/.oh-my-zsh/themes/afowler.zsh-theme&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Understanding the command flags:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;-v&lt;/code&gt; (Verbose):&lt;/strong&gt; Reports what changes are being made so you can see exactly what Stow is doing.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;-S&lt;/code&gt; (Stow):&lt;/strong&gt; Explicitly tells Stow to &amp;ldquo;stow&amp;rdquo; (install) the package.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;-t ~&lt;/code&gt; (Target):&lt;/strong&gt; Specifies the target directory where the symlinks should be created. &lt;code&gt;~&lt;/code&gt; represents your home directory.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;shell&lt;/code&gt;:&lt;/strong&gt; The name of the package (the folder name) you want to stow.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="summary-table-what-each-package-puts-in-"&gt;Summary table (what each package puts in &lt;code&gt;~&lt;/code&gt;)&lt;/h3&gt;
&lt;p&gt;If we look at the other folders we can create the following table:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Package&lt;/th&gt;
&lt;th&gt;What appears in your home directory&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;shell&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.zshrc&lt;/code&gt;, &lt;code&gt;.bashrc&lt;/code&gt;, &lt;code&gt;.profile&lt;/code&gt;, &lt;code&gt;.aliases&lt;/code&gt;, &lt;code&gt;.functions&lt;/code&gt;, &lt;code&gt;.oh-my-zsh/...&lt;/code&gt;, etc.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;git&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.gitconfig&lt;/code&gt;, &lt;code&gt;.gitignore&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;vim&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.vimrc&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;ssh&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.ssh/config&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;input&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.inputrc&lt;/code&gt; (readline config)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;cursor&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.config/Cursor/User/settings.json&lt;/code&gt;, &lt;code&gt;keybindings.json&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;terminator&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;.config/terminator/config&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;bin&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;change-background&lt;/code&gt;, &lt;code&gt;.local/bin/env&lt;/code&gt;, &lt;code&gt;.local/bin/uv&lt;/code&gt;, etc.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;backups&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Files under &lt;code&gt;backups/&lt;/code&gt; and &lt;code&gt;.backups/&lt;/code&gt; (lists and dconf backups)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Templates&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;Templates/main.r&lt;/code&gt;, &lt;code&gt;Templates/main.cpp&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Understanding this “package contents mirror &lt;code&gt;~&lt;/code&gt;” idea is the key to mastering Stow.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="6-step-by-step-linking-your-dotfiles-stowing"&gt;6. Step-by-step: linking your dotfiles (stowing)&lt;/h2&gt;
&lt;h3 id="step-1-open-a-terminal"&gt;Step 1: Open a terminal&lt;/h3&gt;
&lt;p&gt;Open your usual terminal (e.g. GNOME Terminal, Konsole, iTerm, Terminal.app).&lt;/p&gt;
&lt;h3 id="step-2-install-stow"&gt;Step 2: Install Stow&lt;/h3&gt;
&lt;p&gt;Make sure it is installed (see section 3).&lt;/p&gt;
&lt;h3 id="step-3-go-to-your-home-directory"&gt;Step 3: Go to your home directory&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="step-4-optional-remove-an-old-clone"&gt;Step 4: (Optional) Remove an old clone&lt;/h3&gt;
&lt;p&gt;If you already have a &lt;code&gt;Stow-Guide&lt;/code&gt; folder and want to start fresh:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;rm -rf Stow-Guide
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="step-5-clone-the-repository"&gt;Step 5: Clone the repository&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git clone https://github.com/matheth/Stow-Guide.git
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="step-6-go-into-the-stow-directory"&gt;Step 6: Go into the Stow directory&lt;/h3&gt;
&lt;p&gt;All Stow commands must be run from the directory that &lt;strong&gt;contains&lt;/strong&gt; the package folders. In this repo, that’s &lt;code&gt;backups/stow&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~/Stow-Guide/backups/stow
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ls
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You should see names like &lt;code&gt;bin&lt;/code&gt;, &lt;code&gt;cursor&lt;/code&gt;, &lt;code&gt;git&lt;/code&gt;, &lt;code&gt;shell&lt;/code&gt;, &lt;code&gt;vim&lt;/code&gt;, etc.&lt;/p&gt;
&lt;h3 id="step-7-preview-what-stow-will-do-dry-run"&gt;Step 7: Preview what Stow will do (dry run)&lt;/h3&gt;
&lt;p&gt;Before creating any links, do a &lt;strong&gt;dry run&lt;/strong&gt;. The &lt;code&gt;-n&lt;/code&gt; flag means “don’t change anything, only show what would happen”:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;stow -nvSt ~ *
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;-n&lt;/code&gt;&lt;/strong&gt; = no changes (preview)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;-v&lt;/code&gt;&lt;/strong&gt; = verbose (explain each action)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;-S&lt;/code&gt;&lt;/strong&gt; = stow (create links)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;-t ~&lt;/code&gt;&lt;/strong&gt; = target directory is your home&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;*&lt;/code&gt;&lt;/strong&gt; = every folder in the current directory (every package)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="step-8-resolve-conflicts-if-stow-reports-any"&gt;Step 8: Resolve conflicts (if Stow reports any)&lt;/h3&gt;
&lt;p&gt;If Stow says something like “existing file is in the way”, it means you already have a real file or directory at that path (e.g. a real &lt;code&gt;~/.zshrc&lt;/code&gt; instead of a symlink). Stow won’t overwrite it to prevent data loss.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Options:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Replace your current file with the repo’s version:&lt;/strong&gt;
Back up your current file if you care about it, then remove it and run Stow again.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;mv ~/.zshrc ~/.zshrc.bak
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;stow -vSt ~ shell
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Stow specific packages instead of everything:&lt;/strong&gt;
If you are running into conflicts with one package (like &lt;code&gt;shell&lt;/code&gt;) but want to install others, you don&amp;rsquo;t have to use &lt;code&gt;*&lt;/code&gt; (which tries to stow everything). You can specify exactly which packages you want.&lt;/p&gt;
&lt;p&gt;For example, to stow &lt;strong&gt;only&lt;/strong&gt; the &lt;code&gt;git&lt;/code&gt; configuration:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;stow -vSt ~ git
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To stow &lt;strong&gt;multiple&lt;/strong&gt; packages at once (e.g. &lt;code&gt;git&lt;/code&gt;, &lt;code&gt;vim&lt;/code&gt;, and &lt;code&gt;ssh&lt;/code&gt;), just list them with spaces in between:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;stow -vSt ~ git vim ssh
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="step-9-actually-create-the-links"&gt;Step 9: Actually create the links&lt;/h3&gt;
&lt;p&gt;When the preview looks correct, run the same command &lt;strong&gt;without&lt;/strong&gt; &lt;code&gt;-n&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;stow -vSt ~ *
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You can check a symlink via &lt;code&gt;ls -la ~/.zshrc&lt;/code&gt; to verify it points into &lt;code&gt;~/Stow-Guide/backups/stow/shell/.zshrc&lt;/code&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="7-unlinking-unstowing"&gt;7. Unlinking (unstowing)&lt;/h2&gt;
&lt;p&gt;To &lt;strong&gt;remove&lt;/strong&gt; the symlinks Stow created (without deleting the real files in the repo), you &lt;strong&gt;unstow&lt;/strong&gt; with the &lt;strong&gt;&lt;code&gt;-D&lt;/code&gt;&lt;/strong&gt; flag.&lt;/p&gt;
&lt;h3 id="unstow-all-packages"&gt;Unstow all packages&lt;/h3&gt;
&lt;p&gt;From the same directory as before:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~/Stow-Guide/backups/stow
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;stow -nvDt ~ * &lt;span class="c1"&gt;# preview what would be unlinked&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;stow -vDt ~ * &lt;span class="c1"&gt;# actually remove the links&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="unstow-specific-packages"&gt;Unstow specific packages&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;stow -vDt ~ shell git
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This only removes the links that the &lt;code&gt;shell&lt;/code&gt; and &lt;code&gt;git&lt;/code&gt; packages created.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="8-common-issues-and-fixes"&gt;8. Common issues and fixes&lt;/h2&gt;
&lt;h3 id="stow-command-not-found"&gt;“stow: command not found”&lt;/h3&gt;
&lt;p&gt;Stow isn’t installed or isn’t on your PATH. Install it and try again.&lt;/p&gt;
&lt;h3 id="stow--existing-file-is-in-the-way"&gt;“stow: &amp;hellip; existing file is in the way”&lt;/h3&gt;
&lt;p&gt;You already have a file or directory at that path. Back up the existing file (&lt;code&gt;mv ~/.zshrc ~/.zshrc.bak&lt;/code&gt;) and run stow again.&lt;/p&gt;
&lt;h3 id="i-ran-stow-from-the-wrong-directory"&gt;I ran stow from the wrong directory&lt;/h3&gt;
&lt;p&gt;Stow must be run from the directory that &lt;strong&gt;contains&lt;/strong&gt; the package folders (&lt;code&gt;cd ~/Stow-Guide/backups/stow&lt;/code&gt;).&lt;/p&gt;
&lt;h3 id="i-want-to-edit-my-config"&gt;I want to edit my config&lt;/h3&gt;
&lt;p&gt;Edit the file &lt;strong&gt;inside the repo&lt;/strong&gt; (e.g. &lt;code&gt;~/Stow-Guide/backups/stow/shell/.zshrc&lt;/code&gt;). Because &lt;code&gt;~/.zshrc&lt;/code&gt; is a symlink to that file, the program will see your changes. You can also edit via the link (e.g. &lt;code&gt;nano ~/.zshrc&lt;/code&gt;); you’re still editing the same file in the repo.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="10-quick-reference"&gt;10. Quick reference&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Task&lt;/th&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Go to stow directory&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;cd ~/Stow-Guide/backups/stow&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Preview link all&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;stow -nvSt ~ *&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Link all packages&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;stow -vSt ~ *&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Link specific packages&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;stow -vSt ~ shell git vim&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Preview unlink all&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;stow -nvDt ~ *&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Unlink all&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;stow -vDt ~ *&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Unlink specific&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;stow -vDt ~ cursor&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;Flags:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;-n&lt;/code&gt;&lt;/strong&gt; — No changes (dry run). Use for preview.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;-v&lt;/code&gt;&lt;/strong&gt; — Verbose output.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;-S&lt;/code&gt;&lt;/strong&gt; — Stow (create links).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;-D&lt;/code&gt;&lt;/strong&gt; — Unstow (remove links).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;-t ~&lt;/code&gt;&lt;/strong&gt; — Target directory (your home).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Managing your environment this way ensures that whether you are on a new workstation or a remote server, your personal toolkit is only a &lt;code&gt;git clone&lt;/code&gt; and a &lt;code&gt;stow&lt;/code&gt; away.&lt;/p&gt;
&lt;p&gt;Check out the full repository here:
.&lt;/p&gt;</description></item></channel></rss>