Finding the version of Ubuntu you are running is quick once you know which command to reach for. It matters more often than you would think: tutorials assume a specific release, third-party .deb packages target a particular codename, and PPAs publish builds against a fixed list of supported versions. When something says “Ubuntu 24.04 or newer” or “for noble and resolute,” you need to know which side of that line you are on.
The good news is that Ubuntu gives you several ways to check, and at least one of them works on every install no matter how minimal. This guide walks through each method in order from “works on literally any Ubuntu system” down to the graphical panel, then explains how to read what you get back. There is a quick architecture section at the end for ARM hosts like the Raspberry Pi and the new ARM laptops.
The universal method: cat /etc/os-release
The single most reliable way to identify an Ubuntu system is to read /etc/os-release. It is a plain text file in KEY=value form, it is part of the freedesktop / systemd specification that every modern Linux distribution follows, and it ships on every Ubuntu install (server, desktop, minimal, container, cloud image, WSL). Nothing to install, nothing that can be removed by accident.
cat /etc/os-release
On Ubuntu 26.04 LTS the output looks like this:
PRETTY_NAME="Ubuntu 26.04 LTS"
NAME="Ubuntu"
VERSION_ID="26.04"
VERSION="26.04 LTS (Resolute Raccoon)"
VERSION_CODENAME=resolute
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=resolute
LOGO=ubuntu-logo
For scripts, the two fields you almost always want are VERSION_ID (the numeric version, like 26.04) and VERSION_CODENAME (the lowercase codename, like resolute). If you only want a single line for humans, grab PRETTY_NAME:
grep '^PRETTY_NAME=' /etc/os-release
Or load the file as shell variables and use them directly:
. /etc/os-release
echo "Running $PRETTY_NAME (codename: $VERSION_CODENAME)"
The os-release manpage notes that /etc/os-release is the canonical location and /usr/lib/os-release is a fallback if the /etc copy is missing. In practice you will only ever read /etc/os-release, and you can rely on it being there.
lsb_release: the classic command
If you have ever followed an Ubuntu tutorial, you have probably seen lsb_release -a. It is still the friendliest version printer for interactive use, and it returns the same four fields the original 2017 version of this guide showed.
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 26.04 LTS
Release: 26.04
Codename: resolute
The “No LSB modules are available.” line is harmless. It just means no LSB module metadata is available on the system, and you can ignore it. The actual version data still prints below it.
You can ask for individual fields when you only want one of them. This is handy in shell scripts.
lsb_release -r # Release: 26.04
lsb_release -c # Codename: resolute
lsb_release -d # Description: Ubuntu 26.04 LTS
Pair -r, -c, or -d with -s to get the value with no label, which is what you want when assigning to a variable:
codename=$(lsb_release -cs) # → "resolute"
One caveat in 2026: on the most minimal images (some cloud and container builds), the lsb-release package is no longer installed by default, and you will get command not found. That is the main reason to prefer /etc/os-release for scripts; it is always there. If you want lsb_release on a minimal system, install it with sudo apt install lsb-release.
hostnamectl: the systemd one-liner
hostnamectl reports the hostname, but as a side effect it also prints the OS, the kernel version, and the architecture, all in a single readable block. It works on normal systemd-based Ubuntu desktop and server installs, where it is the most convenient single-command summary. It is not guaranteed to work inside containers, chroots, WSL, or stripped-down images that ship without systemd or DBus; on those, fall back to /etc/os-release.
hostnamectl
Static hostname: workstation
Icon name: computer-laptop
Chassis: laptop
Machine ID: 4f6c1b... (truncated)
Boot ID: 9c2e08... (truncated)
Operating System: Ubuntu 26.04 LTS
Kernel: Linux 7.0.0-14-generic
Architecture: x86-64
The three lines at the bottom are the useful part. Operating System matches what lsb_release -d would show, Kernel tells you which Linux kernel series is loaded (Ubuntu 26.04 LTS ships Linux 7.0 and Ubuntu 25.10 ships 6.17), and Architecture is the runtime CPU architecture. If you only want one of those fields, you can pull it with awk:
hostnamectl | awk -F': ' '/Operating System/ {print $2}'
/etc/issue: the original old-school check
Long before /etc/os-release was standardised, Ubuntu wrote its identity into /etc/issue, the same file that prints above the login prompt on a text-only console. It still works.
cat /etc/issue
Ubuntu 26.04 LTS \n \l
The \n and \l are placeholders that getty expands to the hostname and the TTY name on the login screen; in your terminal they print literally. You can ignore them. This method is mostly useful when you are SSHed into a stripped-down system and want a single short line, or when you are looking at someone else’s screenshot and the login banner is the only Ubuntu fingerprint visible.
The graphical way: GNOME Settings, About
The original version of this article walked through the Unity desktop’s System Settings panel. Unity stopped being Ubuntu’s default desktop in 17.10 Artful Aardvark (October 2017), and modern Ubuntu (20.04 LTS and newer, including 24.04 LTS Noble Numbat, 25.10 Questing Quokka, and 26.04 LTS Resolute Raccoon) uses GNOME instead. The graphical path looks a little different now.
To check your version with the mouse on any current Ubuntu desktop:
- Open the Settings application. The fastest route is the system tray in the top-right corner of the screen, where the power, network, and sound indicators live: click the cluster, then click the gear icon. You can also press the Super (Windows) key, type
Settings, and hit Enter. - In the Settings sidebar, choose System, then click About. The full path is Settings > System > About, which Canonical’s desktop documentation uses for both Ubuntu 24.04 LTS and 26.04 LTS.
- The right-hand pane lists your device name, hardware model, memory, processor, graphics, disk capacity, and at the bottom the Operating System (e.g. “Ubuntu 26.04 LTS”), Windowing System (“Wayland” on 26.04, which is now Wayland-only), and a Software Updates button.
The About panel is the same on every modern GNOME-based Ubuntu flavour. The Settings app itself is slightly different on Ubuntu MATE, Xubuntu, Kubuntu, and Lubuntu, but every one of them has an equivalent “About this system” entry somewhere in its settings.
Reading what you get back: release, codename, LTS
Whichever method you use, you end up looking at three pieces of information: a release number, a codename, and (sometimes) the letters “LTS”.
The release number is YY.MM: the year and month of the release. 24.04 shipped in April 2024, 25.10 in October 2025, 26.04 in April 2026. The next release after this article was written will be 26.10 in October 2026.
The codename is the alliterative animal that Canonical assigns to each release. They run in alphabetical order: noble (24.04), oracular (24.10), plucky (25.04), questing (25.10), resolute (26.04). The codename matters because PPAs and third-party .deb packages target codenames, not version numbers. When you add a PPA, you might be asked to choose between noble and resolute, and you need to pick the one that matches your VERSION_CODENAME.
LTS stands for “Long Term Support”. Canonical splits Ubuntu releases into two tracks:
- LTS releases ship every two years in April (22.04, 24.04, 26.04) and receive five years of standard security maintenance. Ubuntu 26.04 LTS is supported through May 2031; 24.04 LTS through May 2029. With an Ubuntu Pro subscription, LTS releases get an additional five years of Expanded Security Maintenance on top.
- Interim releases ship in October and the following April (24.10, 25.04, 25.10) and receive only nine months of support. Ubuntu 25.10 Questing Quokka is supported through July 2026.
If you are running an interim release, plan to upgrade. They are a great way to try newer kernels and desktop features without waiting two years for the next LTS, but the short support window means you cannot just leave one installed and forget about it. If you are running an LTS, you can stay on it for years; many production servers run nothing but LTS releases for exactly that reason. (For a wider look at the picks people are recommending in 2026, our best Linux laptops buyer’s guide has the current shortlist, and the Fedora-vs-Ubuntu landscape covers how that conversation has shifted.)
Architecture: 64-bit Intel, ARM, or something else
The 2017 version of this article only asked one architecture question: 32-bit or 64-bit? That is now an easy answer. Ubuntu Desktop dropped 32-bit Intel images years ago, and a modern Ubuntu install is almost certainly 64-bit. The interesting modern question is whether you are running on Intel/AMD (x86_64) or on ARM (aarch64), because ARM hosts are now common: the Raspberry Pi 4 and 5, ARM-based AWS Graviton servers, Apple Silicon Macs running Ubuntu inside a VM, and the new wave of Snapdragon X laptops shipping in 2026 all use ARM CPUs.
There are two commands that answer “what architecture am I on”, and they answer slightly different questions.
uname -m reports the kernel’s machine type, the same string the Linux kernel sees from the hardware.
uname -m
Common outputs include:
x86_64on any 64-bit Intel or AMD machine (the overwhelming majority of desktops, laptops, mini PCs, and cloud instances).aarch64on 64-bit ARM. This covers Raspberry Pi 4/5 running 64-bit Ubuntu, ARM servers, Apple Silicon under virtualisation, and Snapdragon laptops. Note thatuname -malone cannot tell you specifically that you are on Apple Silicon; it only tells you the CPU is 64-bit ARM. To identify Apple Silicon you would need to look at other hints, like the virtualisation product reported bysystemd-detect-virtor the device tree.armv7lon 32-bit ARM (older Raspberry Pi boards, embedded devices).i686on the increasingly rare 32-bit Intel system.riscv64,s390x, andppc64elon Ubuntu’s other officially supported architectures (RISC-V, IBM Z, and IBM POWER respectively). You are unlikely to see these on a personal machine, but Ubuntu ships builds for all of them.
dpkg --print-architecture reports the Debian/Ubuntu package architecture, which is the name apt uses to decide which .deb files you can install.
dpkg --print-architecture
The Debian names do not match the kernel names exactly:
x86_64from the kernel maps toamd64indpkg.aarch64from the kernel maps toarm64indpkg.armv7lfrom the kernel maps toarmhf(“ARM hard-float”) indpkg.
The two commands disagreeing is normal; they are answering different questions. When a .deb download page asks which architecture to grab, use the dpkg --print-architecture answer. When a script needs to branch on hardware (“am I on Apple Silicon?”), use uname -m. The Debian Multiarch HOWTO explains why the two naming systems exist if you want the full story.
Putting it together
For the absolute “no-thinking, works everywhere” check, source the os-release file and read the two fields you care about:
. /etc/os-release && echo "$PRETTY_NAME ($VERSION_CODENAME) on $(uname -m)"
# → Ubuntu 26.04 LTS (resolute) on x86_64
That one line tells you the marketing name, the codename a PPA will ask about, and the architecture an installer will need. Everything else in this guide is a friendlier or more detailed way to ask the same set of questions.
Looking for what to install on the version you just identified? Our older walkthrough on installing software in Ubuntu covers the apt and Software Center basics, and Canonical’s Inference Snaps are the most interesting new way to add software on a current LTS.
Legacy: the original Unity walkthrough (2017)
The video below is the original 2017 walkthrough that shipped with this article. It demonstrates the Unity 7 System Settings panel, which is no longer the default in modern Ubuntu but still works on older systems and on Ubuntu Unity remix images. Treat it as a historical reference rather than current instructions; the terminal commands at the top still work, but the graphical steps now live in GNOME Settings as described above.
