Skip to content

Use Stow to Create Dotfiles Without Any Effort

Published: at 07:29 PM

Table of contents

Open Table of contents

Introduction

GNU Stow is a symlink farm manager that makes managing dotfiles incredibly simple. Instead of manually creating symlinks or copying files around, Stow handles everything for you. Here’s how to get started.

Step 1: Check Your Existing Dotfiles

First, verify which dotfiles you want to manage. For example:

ls -la ~/.aerospace.toml

Step 2: Copy Files to Your Dotfiles Folder

Copy the files you want to manage into your dotfiles repository. The -p flag preserves file attributes:

cp -p ~/.aerospace.toml ./

Run Stow with the --adopt flag. This will:

stow --adopt .

After this, any changes in your ~ folder will be automatically synced to your dotfiles repository.

Step 4: Commit Your Changes

Don’t forget to commit your dotfiles to version control:

git add .
git commit -m "Add dotfiles configuration"

Now your dotfiles are version-controlled and can be easily synced across machines!