>
Artificial Intelligence

Seven Ubuntu tweaks I run on every fresh install

I have installed Ubuntu on at least thirty machines in the last three years. Laptops for clients, a few home lab machines, two of my own. The first thing I do on a fresh install is open a terminal and start changing things. Most of the changes are tiny. All of them are things the default Ubuntu desktop does not get right for me. None of them are magic, and none of them are required. They are the seven things I have stopped skipping.

A note before the list. Ubuntu is good. I do not mean this as a complaint. The defaults are aimed at a person who has never used Linux. I have used Linux for fifteen years, and I want a different set of defaults. The list below is the second set, not a fix for a broken first set. Skip the ones that sound like me. Keep the ones that sound like you.

Disable the Ubuntu Report

Ubuntu phoned home (a phrase that means “sent anonymous usage data to Canonical’s servers”) the first time I logged in, before I had even opened a browser. There is a system setting that says “Send anonymous system info” and the default is on. Turn it off. Open Settings, find Privacy, and flip the toggle. You can also run ubuntu-report -f send no from a terminal to make it stick across reinstalls.

Why I bother. The data is supposed to be anonymous. It might be. I have read the spec. I still do not want a fresh OS install telling a vendor what hardware I have, what locale I am in, and what I clicked on first. Privacy is not a thing you opt out of later. It is a thing you set up at install time. I treat this the same way I treat closing the curtains.

Install the Restricted Extras Package

The meta package (a package that pulls in a list of other packages as one install) ubuntu-restricted-extras contains MP3 codecs, the Microsoft fonts, DVD playback, and a few other small things that Ubuntu cannot ship by default for legal reasons (a polite way of saying “patent-encumbered”). Without it, you will open an MP3 in the default audio player and get a friendly “codec missing” dialog. With it, you will open the same file and hear music.

I install it on day one. The command is sudo apt install ubuntu-restricted-extras. You will get a license prompt for the Microsoft fonts. Accept it. Tab to OK and press Enter. If you skip the fonts you will spend the next six months wondering why every PDF you open from a coworker looks slightly off.

Turn Off Unattended Upgrades (or Pin Them to a Schedule)

Ubuntu installs unattended-upgrades (a background service that installs security updates on its own) and turns it on. Most of the time this is the right call. About once a year it is the wrong call, because a kernel update lands at the worst possible moment and reboots a server I am using at 2 AM. The fix is not to disable the package. The fix is to schedule it.

Open /etc/apt/apt.conf.d/20auto-upgrades and change the upgrade windows. Mine is set to install security updates between 4 AM and 5 AM on Sunday, when the laptop is plugged in and I am asleep, and never to install a new kernel without my say-so. The config is small and well-commented. Set it once and forget it.

If you are running a server, this is a meaningful thing. If you are running a laptop, the default is probably fine, and you can skip this step.

Set Up Timeshift

Timeshift is a system-restore tool for Linux (the equivalent of Windows System Restore or macOS Time Machine, but for the whole filesystem). It takes snapshots of the system state on a schedule and lets you roll back. The first time I used it was after I tried to install a driver for a printer that does not exist anymore and bricked the network stack. I rolled back to the morning’s snapshot, the network came back, and I did not have to learn what I had done wrong.

Install with sudo apt install timeshift. Run it, point it at a partition with at least 30 GB free, and turn on weekly snapshots. The default schedule is fine. I bumped mine to daily because I am paranoid, and a snapshot is about 2 GB so the storage cost is real but small.

The thing I like about Timeshift is that it does not back up my home directory. That is rsync’s job, and I do that separately. Timeshift’s job is to let me undo a system change, which is the kind of mistake I make about once a month.

Install the GNOME Tweaks Tool

GNOME is the desktop environment (the visual layer between the Linux kernel and the apps) Ubuntu uses by default. It is opinionated. Some of the opinions match mine. Some do not. The Settings app that ships with Ubuntu exposes about a third of the knobs GNOME has. The rest are in gnome-tweaks.

Install with sudo apt install gnome-tweaks. Open it. The tabs that matter:

  • Top Bar. Show weekday, show seconds, show battery percentage. Your call.
  • Window Titlebars. Minimize and maximize buttons. I want both. The default is neither.
  • Fonts. Change the antialiasing (the smoothing of fonts on screen) from “Standard” to “Subpixel” if you are on a high-DPI display. The difference is visible.
  • Extensions. I install three: Dash to Dock (turns the dash into a real dock), Blur My Shell (a subtle background blur on the overview), and Clipboard Indicator (a clipboard manager that remembers more than the last thing you copied).

That is the GNOME I want. With those four changes the desktop stops fighting me.

Fix the Default App for Common File Types

Ubuntu’s default for opening a .deb file (a Debian software package, Ubuntu’s installation format) is the Software Center, which then tells you it cannot install the file because Software Center is sandboxed. The default for opening a PDF in a browser is GIMP if you have ever installed GIMP. The default for opening a text file is sometimes LibreOffice Writer, which is technically an app that can read text files, the same way a forklift is technically a chair.

I open mimeapps.list in ~/.config/ and fix the ones I care about. The format is application/x-deb=org.gnome.FileRoller.desktop or similar. I point .deb at apturl.desktop (which calls apt under the hood), PDFs at evince.desktop (the GNOME PDF viewer), and text files at code.desktop if I have VS Code installed, or gedit.desktop if I do not. The file is plain text. Edit it once, log out, log in, the changes stick.

This sounds small. It is small. The first time I fixed this I stopped having a low-grade annoyance every time I downloaded a file. That is the point.

Set Up SSH-Agent and a Reasonable Git Identity

If you are going to use this machine for any kind of work, you will use SSH. The default install does not start ssh-agent (a background process that holds your private key in memory so you only have to type the passphrase once per session). I add the line eval $(ssh-agent -s) to my ~/.bashrc and a corresponding ssh-add line to bring in my key on first use.

Git is the same. Run git config --global user.name "Your Name" and git config --global user.email "[email protected]". If you work on multiple machines with different identities, set up includeIf blocks in ~/.gitconfig that switch based on the working directory. The block syntax is a few lines and saves you from committing with the wrong email on the wrong machine.

Both of these are five-minute jobs that pay back forever.

Trade-offs

The trade-off in time is the first one. This is about forty-five minutes of work on a fresh install. I do it once and never think about it again. A new user doing it for the first time will probably spend two hours, mostly reading the tooltips and figuring out which GNOME extension does what. That is a real cost. The benefit is that the laptop stops being a chore to use.

Money is not a cost here. Everything I listed is in the default repos. GNOME Tweaks is free. Timeshift is free. ubuntu-restricted-extras is free. The only thing that costs money is the disk space Timeshift uses, and that is two gigabytes a day at my schedule.

Features are the bigger trade-off. Some of the GNOME defaults I am turning off exist for a reason. The Software Center’s refusal to install random .deb files is a sandboxing decision, and a paranoid user with a kid using the same laptop is correct to leave that on. The unattended-upgrades default is the safe call for a laptop. I am overriding both because I am the only user of my machines and I know what I am installing. If you are not the only user, leave those two alone.

The upside is the daily experience. A Linux laptop that has been set up by the person who uses it is a different object from a fresh install. It boots faster, the desktop gets out of the way, and the things that should be one click are one click. I have done this enough times to know the order of operations, and the order is what I wrote down here.

Bottom line

If you only do one thing from this list, set up Timeshift. The other six are quality-of-life. Timeshift is the one that saves you the next time you break something. The day I added it, I stopped being afraid of system-level changes, and I learned more about my own laptop in the next month than I had in the previous year. That is worth forty-five minutes and two gigabytes of disk.

The other six are the small things. None of them is the most important thing. All of them together are why my laptop feels like my laptop and not like a rented one.

Leave a comment