Finding your Ubuntu version is quick once you know which terminal command to reach for, or which Settings panel to open. 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.
Ubuntu gives you several ways to check the version. /etc/os-release is the one that works on every install, no matter how minimal.
Check your Ubuntu version in the /etc/os-release file
/etc/os-release 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
Pull single fields out of os-release for a script
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 prints the Ubuntu release and codename in one block
If you have ever followed an Ubuntu tutorial, you have probably seen lsb_release -a. 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. 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"
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 works on Ubuntu Server and systemd desktop installs
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, which makes it the most convenient single-command summary wherever systemd is running. 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 holds the Ubuntu version line for console logins
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.
Check the current Ubuntu version in GNOME Settings
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 hardware details: device name, hardware model, memory, processor, graphics, and disk capacity. Underneath them you will find the Operating System (e.g. “Ubuntu 26.04 LTS”), the 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.
The Ubuntu version number, codename, and LTS label each tell you something different
Whichever method you use, the string you get back is some mix of the three.
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 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 let you 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 without a forced upgrade. (For a wider look at Linux laptops in 2026, our best Linux laptops buyer’s guide has the current shortlist, and the Fedora-vs-Ubuntu comparison weighs the two distributions against each other.)
Architecture: 64-bit Intel, ARM, or something else
The 2017 version of this article only asked one architecture question: 32-bit or 64-bit? Ubuntu Desktop dropped 32-bit Intel images years ago, and a modern Ubuntu install is almost certainly 64-bit. The split that matters now is Intel/AMD (x86_64) versus 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 Snapdragon X laptops shipping in 2026 all use ARM CPUs.
uname -m reports the kernel machine type
The kernel’s machine type is read off the hardware itself, with none of the naming conventions a package manager applies.
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 name apt uses
The Debian/Ubuntu package architecture decides which .deb files apt will let you 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.
One command that prints the Ubuntu version, codename, and architecture
For the “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.
Our older walkthrough on installing software in Ubuntu covers the apt and Software Center basics, and Canonical’s Inference Snaps are a newer way to add software on a current LTS.
Frequently Asked Questions
How do I check my Ubuntu version from the terminal?
Run cat /etc/os-release for the version number and the codename, lsb_release -a for a labelled summary, or hostnamectl for the version plus the kernel and the architecture. The os-release file is the one command that works on every Ubuntu install, including the minimal cloud and container images that ship without lsb_release.
How do I check my Ubuntu version without the terminal?
Open the Settings application, choose System, then click About; the Operating System line in that pane gives you the same Ubuntu version the terminal commands print.
Is my Ubuntu install 32-bit or 64-bit?
Run uname -m. Both x86_64 and aarch64 are 64-bit, on Intel or AMD and on ARM respectively, and a modern Ubuntu desktop is almost certainly one of the two. i686 means 32-bit Intel and armv7l means 32-bit ARM. When a download page asks which architecture to grab, run dpkg --print-architecture and use that name instead.
What do the codename and the LTS label in an Ubuntu version mean?
The codename is the animal name Canonical gives each release, and it is what PPAs and third-party .deb packages target instead of the number, so resolute matters more than 26.04 when you add a repository. LTS means Long Term Support: five years of standard security maintenance, against nine months for an interim release.
The original Unity walkthrough from 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.