How to Manage Dotfiles on Linux

Today I talk about how I manage my dotfiles.

Patreon –
Liberapay –
Youtube –

===== Follow us 🐧🐧 ======
Discord –
Odysee –$/invite/@thelinuxcast:4
Subscribe at
Contact us [email protected]
Telegram Group –
Amazon Wishlist –
Merch Store –
Logo Courtesy of –

==== Special Thanks to Our Patrons! ====

==== Time Stamps ====
0:00 Intro
1:16 My Repo
2:24 Sym Link Mania
5:42 My Script
7:00 Conclusions

#tut #linux #thelinuxcast


  1. I also used to create symlinks on my .config. But then I turned the .config directory itself into a git repository. From there I can push, pull and even switch branches.

  2. That's a sound way to do it. You have full control through your custom script. Another way is stow. It's a linux package that basically does that symlinking.

  3. You should take a look at "stow" which is a simple peel program meant to handle for files. It does exactly what your script does except more automatically.

  4. Started focussing more on .Files too. Especially now that I use a separate /home partition and Inwant to migrate my personal settings when distro switching 💪🙏

  5. The method isn't new and there's nothing fundamentally wrong or superior to it. The one obstacle I see is git is not for everybody. I know a lot of people just don't understand git For those folks i suggest their configuration management system of choice or even keeping their set of config files in a directory that can be distributed by say rsync.

  6. +1 for just using stow.

    Btw it’s probably better to do the repo rename on the git clone command. I’ve had weird issues with git after renaming a repo manually after cloning

  7. I think you would really like stow, because it just creates symlinks, so you still have control. Although for this to work you would need to have a little different structure in your dotfiles, like ~/myrepo/i3/.config/i3 (so first i3 directory acts as root/home directory) and then you symlink your stuff like this: "stow -d ~/myrepo -t ~ i3" (where -d is source dir, -t is target dir, and i3 is module name, so basically contents of i3 folder in myrepo). If e.g. .config/i3 directory already exists in your $HOME, then it would symlink all the files individually, as it won't overwrite anything, and just keeps the folder structure.

  8. Great video, Matt! Expert “ricers” probably have their own method, but this is simple and very useful for newcomers!
    By the way, JFYI you can pass a second argument to ‘git clone’ specifying the name of the cloned folder ( ‘git clone <link> myrepo’ in your case), rather than using the ‘mv’ command afterwards.

  9. I use chezmoi + keepassxc which give me a possibility to keep passes, ssh key and all important information separate from git repo. You way is pretty dangerous and you didn't mention this in your video. A lot of people push their passes to github/gitlab and where are a lot of bots monitored new repos in order to steal them

  10. This would be simpler if you house your /home directory on its own hard drive, and mount that at /home. This simplifies having all your config and home files available for any disto you switch to.

  11. My preferred way was just initiating git repo in my home. Downside is that every new file or directory I don't want commited must be ignored but that is also a good thing since no junk files can sneak up on my system.

  12. Personally I find chezmoi to be way easier for managing multiple devices (like a desktop and a laptop, or different operating systems). It requires you to learn the templating system to be effective, though.

  13. I'm like you Matt. I do mine manually too. I never thought of using sim-links like that, cool.
    I do the sim-link trick on my server to some folders and it does work great. Like the script it is a cool idea.
    I did not think of using my Git repo as my dot folder. Will have to give that some thought… 🤔

    Thanks Matt!

    LLAP 🖖

  14. Nice system. I backup my dot files in two locations. I have a series of scripts which give me finer control to both backup and restore. My files physically exist in my home directory. Anyway, it’s my system and I love it. Thanks for sharing. Cool idea.

Leave a Reply

© 2023 53GB