I frequently reinstall Linux. Is there a tool to say what to install and configure that I can just run once after OS install? Things like
- Install neovim, signal, steam
- Configure firefox, desktop environment
I’m using this for just me, on my personal machine.
I don’t anticipate it’s possible between different distros, so assume I’m reinstalling the same distro.
EDIT: thanks for replies. I’m mostly seeing Ansible and NixOS. I’ll start looking at those.
Not a full reinstall solution, but aptik is one of the only utilities I’ve found useful enough to pay for. Last time I reinstalled it saved me many hours of configuring.
I frequently reinstall Linux.
Like, how many times in a year? And secondly, for what reason?
Usually if I’ve made a mess with installs or config and want a clean slate, but this time I’m doing it cos I tried out a new OS and it didn’t work out.
Hard to say exactly, how much, maybe twice a year, but when I do reinstall I often reinstall like three times in quick succession until I get a good foundation.
Aight. Understood. Thank you!
In your case, I’d propose something like NixOS then. As your full system configuration can be contained within a (set of) config file(s), the very same ones you use to install/config stuff, a reinstall just becomes very easy. Heck, if you’re willing to embrace the “Erase your darlings”-lifestyle, then I don’t even think you’d ever feel the need for a reinstall. Because, frankly, the clean slate is just a reboot away.
EDIT: Perhaps Guix System is also worth considering as an alternative to NixOS*.
EDIT2: If you still want to explore other distros, then it’s worth noting that nix, i.e. NixOS’ package manager, is available on most distros and offers a lot of the benefits already. Like, you could configure your system using it, and then use that config on another distro to get your config back. Good stuff.
Why don’t you try distros in a virtual machine first?
I do, but something about it doesn’t feel right. Maybe I’m just not committing to it cos I can too easily jump back to the host OS
To be fair, testing in a VM is for seeing the basic fundamentals of the OS. Ok, let me try to help with a couple of things then.
For finding you distro:
- Find your favourite environment. Is it GNOME, is it KDE, Cinnamon, maybe it’s Xmonad or dwm? There are a lot of these and you should test this first. Distro doesn’t really matter in this step. Just find one with the desired environment and test it in a VM.
- Once you find your perfect environment, find out if you want a really stable system or something cutting edge? Maybe something balanced in between. Distro still doesn’t matter in this step. Once you decide what you want, now you can find distros that suit this.
- Choose you favourite init system (Optional). Some people like to control what’s under the hood. Just note that, not choosing systemd will filter a lot of distros here. If you don’t care what’s under the hood, skip this step.
- Now you have narrowed down to possibly 3-10 distros. Still a lot. However this step is where you choose your favourite package manager. If you don’t care about the mechanism, just pick one you liked from the default installations of them. If you are using Linux for some time, you might already have a favourite package manager.
- Congratulations, you have found your distro. Just use it and see for yourself.
- Wait, it might still not be the correct one. However you cannot know this without using them daily. Some people stay with what distro they start, some people distrohop a lot and settle on Debian. And some other love their niche distro that works nicely for them. Stay with what really clicks with you.
The best would be NixOS, but if you just want to automate your install which you have then Ansible.
If a debian based distro there’s several ways to copy your package choices from one machine to another, the likes of using dpkg --get-selections and using that output on the new machine with --set-selections, but probably the easiest way is to use apt-clone, which streamlines that process to install the same packages on the new machine.
As for your firefox and desktop packages, they’ll be saved in /home/username (usually in .hidden dirs) - so just copy all of that over.
Alternatively, use an image cloner like clonezilla to make an exact disk copy and install that.
Or run your machine as a vm inside Proxmox or another hypervisor. That way you can have instant snapshots before you do risky things, as well as multiple scheduled entire-machine backups.
Or ansible (which I do a lot of), which can set whatever packages and copy your golden-image files over as you want. (But keeping those up to date requires a little thought)
Ansible, Salt, Puppet, Chef, Terraform, …
I have tuxmate selfhosted
+1 for ansible
imo, the best solution for this is easily NixOS
explicit reproducible system configurationI’ve started creating an ansible playbook. I’ve added flatpaks, os specific packages, Firefox extensions, samba Mount point services in there. As of now I use it for PC (Ubuntu) and laptop (Fedora) only 3 is packages needed separate names. I’ll have a look at tuxmate as suggested in other post but just running playbook once every week also does update.
I’m now trying out SUSE microOS for my mini servers. These are initially setup via combustion / ignition. you add these scripts to a usb stick and insert them during the first boot where they initialize fhe system. As far as I saw, at least ignition is quite open and supported by most distros
It’s possible to create a custom Linux ISO. That will solve the application installation problem.
There are several tools. Ansible is an excellent cross platform tool for provisioning systems. I use it to manage packages, users, network and firewall configs, etc. across several systems.
all configuration management languages do this and have forums where people share their code so that you copy/paste and then tweak them to your own needs. ansible galaxy comes to mind.
if you want pure linux, there’s also kickstart or preseed.
bootc image
Fedora offers
kickstart.Others have
cloudinitorignition.Those are the ones if used personally.



