Skip to content
minimachine.
← The path
Step 05 · Foundations Intermediate · 15 min

⚙️Essential system settings

A handful of one-time gestures: user, automatic updates, smart swap (zram), and the basic tools. The machine becomes clean and stable.


Ubuntu is installed. It works. But a fresh machine is an empty apartment: it stands up, but the furniture and the running water are missing. Five minutes of setup now, and the machine becomes clean, stable, and pleasant to live with, for years.

We’ll do all of this by hand once, to understand it. And you’ll see at the end: next time, you’ll let the agent handle it.

Update and lay down the basic tools

First, we make sure everything is up to date, then we install the toolkit we’ll use in every guide that follows.

# Always start by refreshing and updating
sudo apt update && sudo apt upgrade -y
# The basic kit: compiler, git, curl, system monitor, terminal multiplexer
sudo apt install -y build-essential git curl htop tmux

What each one gives you:

  • build-essential : the C compiler and the tools many programs require to install. You lay it down once and never think about it again.
  • git : version control. Indispensable the moment you touch code.
  • curl : to download files and test servers from the terminal.
  • htop : a readable system monitor (CPU, RAM, processes). Type htop and watch your machine breathe in real time.
  • tmux : the terminal multiplexer. The most valuable one for remote work.

Give the machine a name

By default your machine is called something like ubuntu-desktop. Let’s give it a short, clear name, handy as soon as you have several, or to connect over SSH.

# Rename the machine to "mini" (pick whatever name you like)
sudo hostnamectl set-hostname mini

The change is immediate; the new name will show up fully the next time you open a terminal.

Configure your git identity

Git wants to know who signs the commits. Set it once and for all, globally.

# Your name and email will appear on every commit
git config --global user.name "Your Name"
git config --global user.email "[email protected]"

zram: a smart swap

Here’s the setting few people know about that changes everything on a small machine.

Swap is RAM’s safety valve: when physical memory is full, the system overflows onto the disk. Classic swap writes to the SSD, it’s slow, and it wears the SSD down over time.

zram does better: it creates a swap compressed directly in RAM. Instead of writing to disk, it compresses the data in memory (often 2 to 3× smaller). The result: it’s far faster than disk swap, it protects against memory crashes (the OOM, that moment when the system kills a program for lack of RAM, typically when you load a big AI model), and it spares the SSD.

Install zram-tools

# The package that manages RAM-compressed swap
sudo apt install -y zram-tools

Set the size of the compressed swap

Open the config file and set the proportion of RAM allocated. The value PERCENT=50 (half your RAM) is a good starting point.

# Edit the configuration (nano is the simplest editor)
sudo nano /etc/default/zramswap

Find the PERCENT line and set:

PERCENT=50

Save with Ctrl + O, then quit with Ctrl + X. Restart the service to apply:

sudo systemctl restart zramswap

Automatic security updates

A machine running 24/7 should patch itself. We enable automatic security updates, the machine installs critical fixes without you thinking about it.

# Install the automatic updates tool
sudo apt install -y unattended-upgrades
# Enable it via the wizard (answer "Yes")
sudo dpkg-reconfigure --priority=low unattended-upgrades

Check the time and the language

A quick check: the clock and the locale. A wrong time breaks certificates and skews logs, so it’s worth verifying.

# Show timezone, system time, and sync status
timedatectl

If the timezone is wrong, fix it:

# Example for mainland France
sudo timedatectl set-timezone Europe/Paris

The machine is now clean, named, up to date, and shielded against memory spikes. The kind of foundation you lay once and forget.