Ubuntu is a distribution published by Canonical, first released in 2004. It is based on Debian and aims to be easy to install and use. You will find it on laptops, servers, cloud images and in Windows Subsystem for Linux.
Release numbers
Versions are named by year and month. 24.04 means April 2024. A new release comes every April and October.
Every two years, the April release of an even-numbered year is an LTS (long term support) release, such as 22.04 or 24.04. LTS releases get five years of standard support, and Ubuntu Pro can extend security coverage further. The releases in between, called interim releases, are supported for nine months.
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04 LTS
Release: 24.04
Codename: nobleIf lsb_release is missing, use cat /etc/os-release.
APT and snap
Ubuntu uses Debian's package tools:
$ sudo apt update
$ sudo apt upgrade
$ sudo apt install htopThe first line refreshes package lists and the second installs available upgrades.
Ubuntu also uses snaps, self-contained packages that bundle many of their dependencies and update automatically.
$ snap list
$ sudo snap install hello-worldOn Ubuntu desktop, some applications, including Firefox, are delivered as snaps. Packages from the universe component are community maintained, so their security coverage differs from main.
Administration with sudo
By default the root account has no password, so you cannot log in as root. The user created at install time belongs to the sudo group and runs single commands with elevated rights:
$ id -nG
alex adm cdrom sudo plugdev
$ sudo whoami
rootThe group list is shortened. You are asked for your own password, not a root password.
Firewall
Ubuntu ships ufw, a simple front end that is off by default. Allow SSH before enabling it on a remote machine, or you may lock yourself out.
$ sudo ufw allow OpenSSH
$ sudo ufw enable
$ sudo ufw status
Status: activeThe status output is shortened. The OpenSSH profile exists when the SSH server is installed.
Try it
Run cat /etc/os-release, work out from the version number whether it is an LTS release, then check your groups with id -nG. Update the package lists, and compare apt list --installed with snap list. To learn how users and groups control access, try the accounts and file access lab.
Check your understanding
Ubuntu
All 4 sections ยท no timer
Unlimited retries
Questions from every section are combined into one assessment. Answer them all correctly to complete the article.
Your completion saves in this browser. Sign in to sync it to your account.