Knowing how to check your Ubuntu version is a simple yet essential task that can be accomplished through various methods. Ubuntu is an operating system based on Linux, intended for computers, mobile devices, and network servers. As a user, it's crucial to stay informed about the Ubuntu version you're running for software compatibility, troubleshooting, confirming support status, or planning an upgrade. This article will show you several different ways to find your Ubuntu version, whether you're on a desktop, server, container, or cloud instance. If you're brand new to the OS, our guide on what is Ubuntu is worth a quick read first.

Annotated terminal-style output highlighting Ubuntu 24.04 LTS, release 24.04, and codename noble.

πŸ” Quick Answer: Check Ubuntu Version in Terminal

Need your Ubuntu version right now? Open a terminal and run this:

lsb_release -a

If that command isn't available (common in minimal servers and containers), use the method that works almost everywhere:

cat /etc/os-release

Your release number shows up next to Release or VERSION_ID. Here's what a typical result looks like:

Distributor ID: Ubuntu
Description:    Ubuntu 24.04 LTS
Release:        24.04
Codename:       noble

Just remember: the Ubuntu release is not the same as your Linux kernel version or your CPU architecture. We'll sort out all three below.

πŸ“Š Ubuntu Version Commands Compared

Six commands, six slightly different jobs. This table is your cheat sheet.

Command Shows Best Use Limitation
lsb_release -a Release, description, codename Standard desktop/server May be missing in minimal containers
cat /etc/os-release Distribution and release metadata Most reliable universal method Raw key-value output
hostnamectl OS, kernel, architecture, hostname Full system overview Needs systemd
cat /etc/lsb-release Ubuntu release and codename Ubuntu-specific fallback Not universal across distros
cat /etc/issue Login banner version string Fast fallback Can be customized, less trustworthy
uname -r Kernel version Kernel troubleshooting Does not show the Ubuntu release

In my experience, /etc/os-release is the safest bet on minimal systems and containers. It's practically always there.

πŸ’» How to Check Ubuntu Version from the Command Line

Method 1: Use lsb_release -a

lsb_release -a

This will provide detailed information about your Ubuntu version, including the release number and code name. Want just one piece of info? These narrower flags are handy:

lsb_release -d
lsb_release -r
lsb_release -c

-d gives the description, -r the release number, -c the codename. One thing that trips people up: you might see "No LSB modules are available." That's not an error β€” your release details still print fine right below it.

Method 2: Read /etc/os-release

cat /etc/os-release
Annotated /etc/os-release file highlighting Ubuntu 24.04 LTS, version 24.04, codename noble, and ID ubuntu.

The keys you care about: PRETTY_NAME (the full name), VERSION_ID (machine-readable number), VERSION_CODENAME, and ID (which should say ubuntu). This is my go-to inside containers where lsb_release often isn't installed.

Method 3: Use hostnamectl

hostnamectl

One command, a full snapshot β€” operating system, kernel, and architecture all together. It leans on systemd, though, so it can behave oddly inside containers. When you need to change the hostname of your system, you typically use this command, but it also returns data like your machine ID and Ubuntu version.

Method 4 & 5: /etc/lsb-release and /etc/issue

Treat these as fallbacks, not first picks.

cat /etc/lsb-release
cat /etc/issue

Careful with /etc/issue. It's a login banner, and anyone can edit it. So it's less authoritative than /etc/os-release. The string of numbers before LTS is your Ubuntu version β€” but verify with another method if you need certainty.

πŸ–₯️ How to Check Ubuntu Version in Settings (GUI)

For users who prefer a graphical interface, Ubuntu's System Settings offer an easy way to check your system details:

Ubuntu System Settings showing About page with OS version details

Ubuntu Desktop About screen displaying version information

  1. Click on the gear icon in the top right corner of your screen.
  2. Select "System Settings" and navigate to "System."
  3. Open "About" and look for the Operating System Name or Ubuntu version.

Labels shift a bit between releases and desktop environments, so don't panic if the wording isn't identical to what you see here.

🌐 How to Check Ubuntu Version on a Remote Server

Check Ubuntu Server over SSH

ssh username@server-ip
cat /etc/os-release

No graphical interface needed β€” just log in and read the file.

Check Ubuntu on an AWS EC2 Instance

ssh -i key.pem ubuntu@server-ip
cat /etc/os-release

The default username for official Ubuntu AMIs is ubuntu. If you find yourself using ec2-user, that usually points to Amazon Linux β€” which is not Ubuntu. And if the output says Amazon Linux? Then you're simply not on an Ubuntu instance. You can also use the following to extract specific details:

grep -E -w 'VERSION|NAME|PRETTY_NAME' /etc/os-release

🐳 How to Check Ubuntu Version in Docker

Check an Existing Docker Container

docker exec <container_name> cat /etc/os-release

Check an Ubuntu Docker Image

docker run --rm ubuntu:24.04 cat /etc/os-release

Keep the distinction clear: the Docker host OS and the distribution inside the container are two different things. And skip lsb_release here β€” minimal images rarely ship with it.

Docker container diagram showing os-release output for Ubuntu 24.04 LTS.

How to Check Ubuntu Version in WSL

Inside your Ubuntu WSL session, it's business as usual:

cat /etc/os-release

From Windows PowerShell (works the same on Windows 10 and 11):

wsl.exe -d Ubuntu -- cat /etc/os-release

To see whether you're on WSL 1 or WSL 2:

wsl.exe --list --verbose

Quick clarification: wsl.exe --list --verbose shows the WSL generation, while /etc/os-release shows the Ubuntu release. Two separate things. And Get-Host? That reports PowerShell host info β€” not your Ubuntu version, despite what some old guides claim.

WSL command output showing Ubuntu running on WSL 2, distinct from the Ubuntu release.

If you need to perform administrative tasks after checking the version, you might find it helpful to learn how to switch to the root user in Ubuntu.

πŸ†š Ubuntu Version vs. Kernel Version vs. Architecture

These get conflated constantly. They shouldn't be. Here's the clean breakdown:

Information Needed Command
Ubuntu release cat /etc/os-release
Kernel version uname -r
Machine architecture uname -m
Package architecture dpkg --print-architecture
User-space bitness getconf LONG_BIT

Reading uname -m output: x86_64 or amd64 means 64-bit x86, aarch64 or arm64 means 64-bit ARM, and i386/i686 means 32-bit x86. A CPU supporting 64-bit "long mode" tells you the hardware is capable, not that the installed Ubuntu user space is 64-bit. Check dpkg --print-architecture for the OS truth.

For a deeper understanding of Ubuntu, explore our guide on the best Ubuntu versions to find the ideal one for your needs. To learn more about the differences between popular Linux distributions, you can also explore our guide on Ubuntu vs Mint.

πŸ”„ How to Check for a New Ubuntu Release

Want to know if a newer Ubuntu release exists? This is the command:

do-release-upgrade -c

Here's a mistake I see all the time. People run these:

sudo apt update
sudo apt upgrade

...and assume they're now on the latest Ubuntu. Nope. apt update refreshes package indexes and apt upgrade installs package updates within your current release. They don't move you to a new Ubuntu version. For that, you'll want a proper update or upgrade Ubuntu walkthrough.

⚠️ Troubleshooting Ubuntu Version Commands

Fix lsb_release: command not found

Minimal installs skip it. Install it:

sudo apt update
sudo apt install lsb-release

Or just use /etc/os-release and move on.

Why uname Doesn't Show the Ubuntu Release

uname -a reports the kernel β€” always has. The kernel and the Ubuntu release are versioned independently, so uname will never hand you the distro release. Use /etc/os-release instead.

Why the System Reports Debian, Mint, or Another Distribution

Derivatives share Ubuntu's foundations. If /etc/os-release shows Linux Mint, Pop!_OS, or Debian, check the ID, ID_LIKE, and UBUNTU_CODENAME fields β€” they'll reveal the underlying base.

πŸ“… Ubuntu LTS and Release Support Explained

Two release flavors matter. LTS (Long-Term Support) releases arrive every two years and get five years of standard support β€” solid for servers. Interim releases ship every six months with roughly nine months of support before end of life.

Timeline comparing Ubuntu LTS 5-year support with interim 9-month support, updated April 2026.

As of 2026, always verify the current supported release against Canonical's official release-cycle page β€” that's the authoritative source, and version numbers shift over time.

🎯 Conclusion

Keep these four in your back pocket and you're covered. Run lsb_release -a for an easy, detailed result. Fall back to cat /etc/os-release when you're on a minimal server or inside a container β€” it almost never fails you. Reach for uname -r when you need the kernel version (not the Ubuntu release), and use do-release-upgrade -c to check whether a newer release is waiting.

We hope this article has helped you learn how to check your Ubuntu version through the terminal or the graphical interface. Whether you're managing an Ubuntu VPS remotely or working on an Ubuntu RDP server, these methods will work seamlessly for both environments. Knowing your Ubuntu version is essential for troubleshooting, updates, and ensuring compatibility with various software applications. If you're planning to install MySQL on your system, check out our guide on how to install MySQL on Ubuntu for step-by-step instructions. If you're managing a server, you might also want to install Webmin on Ubuntu for easier administration.

Learn how to check the CentOS version with ease using simple command line methods. If you have any further questions, feel free to drop us a comment below!