Skip to main content
Linux Commands

5 Linux Dotfiles You Should Backup Right Now

In this article, we’ll back up '.bashrc', '~/.ssh/config', '.tmux.conf', '.vimrc', and '.gitconfig' using Git and GNU Stow on Linux, then test the restore process.

— Ravi Saive

Rebuilding a server or reinstalling a laptop is usually quick, until you realize your aliases, SSH shortcuts, and editor settings are gone.

Let’s look at five dotfiles worth backing up with Git and GNU Stow so you can restore them easily.

If you have ever reinstalled Linux, replaced an old laptop, or rebuilt a server after a disk failure, you probably know how frustrating it is to discover that your usual shortcuts are missing.

You type a command that used to be a simple two-letter alias, or try to connect with ssh web, only to realize you no longer remember the hostname or IP address behind it.

Installing your packages again is usually straightforward, but the personal configuration you built up over months or years is much easier to forget because it often lives in only a few hidden files inside your home directory.

These files are commonly called dotfiles because their names begin with a dot (.), which means they are hidden, and a normal ls command does not show them unless you use the -a option.

In this guide, we will look at five dotfiles that can save you the most time after a reinstall. We will then keep them together in a Git repository, manage them with GNU Stow, which creates the required symbolic links, and finally restore them on a clean system to make sure the backup actually works before you need it.

Which Linux Dotfiles Should You Back Up?

Updated on Nov 23, 2026