Setting up a fresh Linux system and getting it ready for your work can sometimes be a tedious time sink. It’s why I have this 5-step approach to making it as fast as I can.
Run a system update
You might have noticed that whenever you see instructions to install something using a package manager, the documentation or the tutorial include a little update command like sudo apt update. Why is that?
Sometimes, when you run a command to install an app, it might return an error. Something like “package not found” or “unable to fetch.” If that happens, it doesn’t necessarily mean that the target package doesn’t exist in the package manager repositories. The package might fail to locate the package if the package manager’s local database is out of sync with the Linux servers.
Whenever you run something like apt install vlc, it doesn’t actually connect to the server right away to locate the package. That would be slow and finicky (depending on your connection). Instead, your OS creates a local index of all available packages and runs the search on that database.
As new packages are added and older versions are updated in the official repos, the local database falls out of sync with the remote repo. It has to be manually updated and synced with the official providers. That’s what sudo apt update does.
After the local index is in sync with the official repos, you can run sudo apt upgrade to update all your packages to their latest versions. Upgrading packages sounds like the opposite of saving time, but regularly running these two commands saves you a lot of time (and trouble) down the line.
Linux apps rely heavily on shared libraries and dependencies. If you don’t regularly update them, you’ll be stuck in what’s called “dependency hell,” where you have to scramble to manually fix dependency issues. If you installed the OS from even a slightly older installer image, you might find yourself spending hours playing wack-a-mole with broken packages. The solution is often as simple as running sudo apt update && sudo apt upgrade.
If you’re on an Arch system, try this command.
sudo pacman -Syu
Fedora people can run sudo dnf upgrade
Select the fastest mirrors
Linux packages aren’t hosted on a single, centralized server. Instead, exact copies of software repositories are hosted in servers all over the world. These servers are called mirrors (because they’re identical.) Not all of these servers are accessible all the time, and they don’t all offer the same download speeds either.
Beginner distros usually have some sort of GUI utility to select the fastest mirror. For example, I’m using MX Linux here, and it has this neat MX Repo Manager tool which automatically selects the fastest mirror for your PC.
You can do the same thing in the terminal with nala.
sudo nala fetch
I have seen mirrors with dial-up speeds and downloading anything from those mirrors is excruciatingly slow. If you notice that your downloads or updates are taking too long, 9 times out of 10, you just need to switch mirrors.
Install packages quickly
On a fresh install, the first thing you probably want to do is install your favorite apps. Normally, you’d just type the package names as you remember them and then install them. Let me show you a faster way.
If you still have access to your previous Linux setup, try this. If you don’t skip to the next step.
Open the terminal on your old machine and enter this command. It creates a list of all packages you manually installed.
apt-mark showmanual > packages.txt
Transfer the packages.txt file to the PC with the new installation. Open a terminal in the that navigate to the folder where you kept the packages.txt file. Then run this command.
sudo xargs apt install -y
This command will install all the packages in the list in one go. You can also edit the text file to remove or add packages before running this command.
If you don’t have access to your old packages, you can use Tuxmate too. This site lets you select packages and gives you a single installation command.
Pull my dot files
I’ve spent some time configuring my Kitty terminal, nvim, and zsh shell, and I’m finally happy with my setup. However, if this machine breaks or if I install Linux on another computer, I don’t want to manually recreate it. That’s what chezmoi is for. This tool lets you push your dot files to a GitHub repo and quickly reapply them with a single command.
Start by installing chezmoi.
sh -c "$(curl -fsLS get.chezmoi.io)" -- -b $HOME/.local/bin
Then open GitHub in your browser and create a blank repo for your dotfiles. I call mine “dotfiles” (so creative.) Then open your terminal and run the following commands.
chezmoi init
chezmoi add ~/.zshrc
chezmoi add ~/.config/kitty/kitty.conf
I only need to back up my zsh and Kitty configurations. You can add whatever dot files you want.
chezmoi cd
git add .
git commit -m "Initial commit"
git remote add origin https://github.com/usr/dotfiles
You’ll have to enter your username and a repo authentication token here.
git push -u origin main
On my new operating system, I can just run this command, and it’ll automatically apply all my configurations.
chezmoi init --apply https://github.com/usr/dotfiles.git
Set up system-wide backups
I didn’t bother setting up system-wide backups until last year when an update broke my CachyOS machine and I lost all my data. I spent days trying to recover the OS to no avail. I’ve since set myself up with a strict rule to maintain system-wide backups.
The good news is most beginner distros make it super easy to create and maintain backups. For example, Timeshift (built into a lot of Debian-based distros) creates system snapshots which you can revert to in case anything breaks.
Setting up a new Linux can be really frustrating sometimes. However, with the right tools and a “work smart, not hard” approach, it can be a breeze.

