System administrationWritten by GLWS10 min readUbuntu 24.04 LTS / AlmaLinux 9
Commands run on your server unless a section says otherwise. Replace example usernames, addresses and paths with your own values. Keep a working session open when changing remote access.

Identify the operating system

Packages are installed through your distribution's package manager. Ubuntu 24.04 LTS uses APT; AlmaLinux 9 uses DNF. Run the operating system check first and use only the matching command blocks below. An apt command will not manage packages on AlmaLinux.

You need working network access, free disk space, and a root account or sudo privileges. sudo -v checks whether your login can authenticate for administrative commands. If you are already root, omit sudo from later commands. Make a current backup before updating a server that holds important data.

Check the release and available space
cat /etc/os-release
df -h /
sudo -v

Find a package before installing

A repository provides packages built and signed for your distribution. Start with the official configured repositories. Package names can differ between distributions, so inspect the description rather than assuming a similar name is the same program.

These examples use curl, a command-line HTTP client. On Ubuntu, apt update refreshes the local package index; it does not install updates. DNF refreshes repository metadata as needed, and --refresh requests a fresh check for the package query.

Inspect curl on Ubuntu
sudo apt update
apt show curl
Inspect curl on AlmaLinux
dnf --refresh info curl

Install and confirm the result

Run the appropriate install command. Review the proposed packages, download size, and dependencies, then accept the transaction if they match your intention. Avoid adding -y while learning: the confirmation screen is useful context.

After installation, curl --version should display the program version and supported features. This verifies that the command is available to your shell. If the package was already installed, the package manager reports that state rather than creating a duplicate installation.

Install on Ubuntu
sudo apt install curl
Install on AlmaLinux
sudo dnf install curl
Verify on either distribution
curl --version

Review and apply available updates

Use the review command first. On AlmaLinux, dnf check-update returns status 100 when updates exist; that is an expected result, not a failed package transaction. The upgrade step updates installed packages within the configured release repositories.

Read the transaction summary and any configuration-file questions carefully. A package update can restart services or require a reboot. Schedule work when an interruption is acceptable, and keep access to your provider's console available.

Review and update Ubuntu packages
sudo apt update
apt list --upgradable
sudo apt upgrade
Review and update AlmaLinux packages
dnf check-update
sudo dnf upgrade
Do not interrupt a package transaction or launch another package manager while it is running.

Check completion before leaving

Expect a successful completion message and no unresolved dependency errors. On Ubuntu, the presence of /var/run/reboot-required indicates a requested reboot. Kernel updates on AlmaLinux normally require a reboot to run the new kernel. Arrange that restart deliberately, then reconnect and check application services. Routine package upgrades do not perform an Ubuntu or AlmaLinux major-version migration.

Official documentation

These upstream references provide more detail on the commands and workflows in this guide.

Your first VPS: Next lesson: Understand the address and DNS path. View all nine lessons.