Package guides, release upgrades, and repository instructions make a lot more sense once you know whether the machine is running jammy, noble, or resolute. To check Ubuntu version quickly, start with the built-in terminal commands below. They work on Ubuntu Desktop, headless servers, cloud VMs, and Ubuntu running inside WSL.
This walkthrough covers the fastest interactive command, a fallback that works well on minimal images, a broader system summary from hostnamectl, and the graphical Settings path for desktop users. None of these checks need sudo.
These methods were verified on Ubuntu 26.04 LTS, 24.04 LTS, and 22.04 LTS. The terminal commands behave the same on Ubuntu Desktop, Ubuntu Server, and Ubuntu on WSL. Only the graphical Settings method requires a full desktop session.
Check Ubuntu Version in the Terminal with lsb_release
For most interactive Ubuntu sessions, lsb_release -a is the cleanest command to check Ubuntu version because it prints the release and codename in one readable block.
lsb_release -a
The lines that matter look like this:
Release: 26.04 Codename: resolute
If you also want the descriptive release name, read the Description line in the full output. On some Ubuntu 22.04 systems, lsb_release -a starts with No LSB modules are available.. That line is informational and the release data below it is still correct.
Print Only the Ubuntu Version Number or Codename
If a guide only asks for the release number or codename, narrower lsb_release flags keep the output short:
lsb_release -r
lsb_release -c
Release: 26.04 Codename: resolute
Check Ubuntu Version from /etc/os-release
The /etc/os-release file is present on every normal Ubuntu install, which makes it especially useful on stripped-down server images, cloud instances, containers, and Ubuntu on WSL. Grep out the fields you care about:
grep -E '^(VERSION_ID|VERSION_CODENAME)=' /etc/os-release
VERSION_ID="26.04" VERSION_CODENAME=resolute
This is the most reliable copy-and-paste option when you only need exact release fields for a repository, support matrix, or script. If you want the full operating system record instead, run cat /etc/os-release.
Check Ubuntu Version with hostnamectl
Use hostnamectl when you want more than the Ubuntu release. It shows the operating system, kernel, architecture, and virtualization details in one command, which is handy on workstations, lab VMs, and remote servers.
hostnamectl
For example, on Ubuntu 24.04 LTS the key lines look like this:
Operating System: Ubuntu 24.04.4 LTS Kernel: Linux 6.17.0-14-generic Architecture: x86-64
Ubuntu 26.04 and 22.04 show their own release names and kernel versions, but the same fields appear in the same place. On WSL, prefer lsb_release or /etc/os-release because they report the Ubuntu user space directly and with less noise.
Check Ubuntu Version on WSL and Ubuntu Server
The same Ubuntu commands work across desktop installs, headless servers, and WSL sessions. The main difference is where you run them.
Check Ubuntu Version in WSL
Open the Ubuntu shell itself, then run lsb_release -a or read /etc/os-release there. Those commands report the Ubuntu release inside WSL, not the Windows host version. If you manage several WSL distributions, PowerShell can help you pick the right one first, but the Ubuntu release number still comes from inside the Ubuntu environment.
Check Ubuntu Version on a Headless Server or Cloud VM
Once you are logged in over SSH, the commands stay the same. On lean server images, /etc/os-release is usually the safest first check because it is always available and does not depend on extra helper packages. After you confirm the release, keep the system current with our guide to update packages via Ubuntu command line or automate security patches with configure unattended upgrades on Ubuntu.
Check Ubuntu Version from the Desktop Settings App
If you are already in a graphical Ubuntu Desktop session, the Settings app can confirm the release without opening a terminal.
- Open Settings.
- Select System in the sidebar.
- Open About.
- Read the Ubuntu release shown in the operating system details.

This path is desktop-only. It does not apply to headless Ubuntu Server installs, most cloud images, or standard terminal-only WSL sessions.
Choose the Right Ubuntu Version Check Method
Each method answers a slightly different need. Use the table below to pick the quickest one for your environment.
| Method | Best For | What It Shows | Environment Fit |
|---|---|---|---|
lsb_release -a | Readable terminal output on most Ubuntu systems | Release, codename, and descriptive release name | Desktop, server, and WSL when the utility is installed |
grep -E '^(VERSION_ID|VERSION_CODENAME)=' /etc/os-release | Minimal images, scripts, SSH sessions, and WSL | Exact release number and codename fields | Best all-around fallback for server and WSL |
hostnamectl | System summaries and troubleshooting | Operating system, kernel, architecture, and virtualization | Full desktop or server installs with systemd |
| Settings > System > About | Desktop users who prefer a graphical path | Ubuntu release in the Settings app | Desktop only |
Ubuntu Version FAQ
Use lsb_release -a if you want a readable summary, or read /etc/os-release if you want the most dependable option on stripped-down images. Both commands run without sudo and work inside Ubuntu on WSL as well as on normal Ubuntu Server installs.
PowerShell can show which WSL distributions are registered and running, but the Ubuntu release itself still comes from inside the Ubuntu shell. Open the Ubuntu session and run lsb_release -a or check /etc/os-release there to see whether it is Ubuntu 26.04, 24.04, 22.04, or another release.
The version is the numbered release such as 26.04, 24.04, or 22.04. The codename is the matching release label such as resolute, noble, or jammy. Repository files and package instructions often use the codename, while support tables and upgrade guides usually lead with the version number.
On some Ubuntu 22.04 systems, lsb_release prints that informational line before the real release data. You can ignore it and read the Release and Codename lines below, or switch to /etc/os-release if you want cleaner script-friendly output.
Conclusion
Ubuntu version and codename are now easy to confirm from the terminal, over SSH, or inside WSL, and the Settings app covers the graphical path on desktop installs. If the machine is due for maintenance next, update packages via Ubuntu command line or configure unattended upgrades on Ubuntu so the release you just identified stays patched.
Formatting tips for your comment
You can use basic HTML to format your comment. Useful tags currently allowed:
<code>command</code>command<strong>bold</strong><em>italic</em><blockquote>quote</blockquote>