How to set up a fresh Ubuntu desktop using only dotfiles and bash scripts

Victoria on August 19, 2019

One of my most favourite things about open source files on GitHub is the ability to see how others do (what some people might call) mundane things,... [Read Full]
markdown guide

Next level would be porting it to an orchestration tool like Ansible, Puppet, Chef or Salt. They include modules to integrate with everything under the sun. It would be a good learning experience and the skills would be transferable to DevOps roles. With these tools, a well designed script could rebuild your system on any distro, regardless of whether it's using apt/dpkg, yum/rpm or something else.


I recommend using stow for that kind of installation (symlinking to your dotfiles).


I’ve tried out stow before, and found even that to be more overhead than I needed to manage my (relatively small, I’ll concede) dotfiles collection. If I recall correctly, stow looks for the files in the same folder structure in the source that it then links to the destination. I found that just writing my own symlink and specifying the destination once was easier than remembering where the dotfile is in the file structure. I’m sure it makes sense for larger installations or ones with more programs than mine, though!


If you want to crank managing dotfiles to eleven, you can also use yadm.


Oh no kidding. Although the encryption feature is neat.


That is a very interesting post. Thank you for writing it.
I have a note where I gather all the tools and installation when I am setting up a new Linux or Mac machine.
I planned to create some script to automate it but never started it.

I definitely must do it.


Some time ago I realized that I can write notes of this nature as scripts, or at least, close to. So now I try to start there whenever possible. Documentation is automation!


I had to laugh when this came across my feed this morning, as I just figured part of this out on my own and started doing it just last week (symlinking my dotfiles). I never thought about the rest though. Thanks for the tip!


Great timing! :D Try not to lose too many hours to it, like I did at first ^^;


Very inspirational since I have three servers I need to get set up in the next few days! This is a great reminder to try automating things!

Also, to anyone who tries something like this, remember that your dotfiles can contain sensitive information! You may need to strip information out of your files and have a private script not hosted publicly that you can use for the sensitive information. If you're feeling bold, you could try to set up a build process that grabs the secrets from another file, environment variables, Hashicorp Vault, probably all sorts of solutions I can't think of and puts them back into the files while orchestrating your scripts!


Symlinks on symlinks 😂 Good luck with the server setups!


Very interesting! It reminds me a bit of a project of my own: where I try to also have a way to automatically configure my Debian machines with just a script. If anyone wants to take inspiration from a vimrc here is mine too: (I'm planning to put it in a dedicated git repo soon). :)


I wonder if it would be because I forgot to make it public.

(Thanks! Glad someone’s paying attention.)


Nice post! I want to do something similar in Ansible, but I like the bash approach you did.

code of conduct - report abuse