How to Check Your Ubuntu Version: A Beginner’s Step-by-Step Guide
If you’ve ever sat down at an Ubuntu machine and wondered, “Wait, which version of Ubuntu am I actually running?”, you are in exactly the right place. It’s one of the most common questions for people who are new to Linux, and the good news is that finding the answer takes only a few seconds once you know where to look.
In this guide, I’ll walk you through it slowly and carefully. I won’t assume you already know Linux commands, and I’ll define every term as we go. By the end, you’ll not only know how to check your Ubuntu version, you’ll also understand *what that version number actually means* and why it matters.
Let’s start from the very beginning.
Key Takeaways
• Ubuntu is a Linux distribution (a complete operating system), and its version identifies which release you’re running, like `22.04` or `24.04`.
• The clearest command is `lsb_release -a`, which shows the description, release number, and codename in plain text.
• You can also read the file `/etc/os-release` or run `hostnamectl` to find the same information.
• Ubuntu version numbers are dates: `24.04` means it was released in April 2024. The `.04` releases in even years are LTS (Long Term Support) versions.
• The Ubuntu (OS) version is different from the Linux kernel version. They update on separate schedules.
What does “Ubuntu version” actually mean?
Before we type any commands, let’s make sure we’re talking about the same thing.
Ubuntu is an *operating system* (the core software that makes your computer or server run). More specifically, it’s a Linux distribution, often shortened to “distro.” A distribution is a complete, ready-to-use package built on top of the Linux foundation, bundled with tools, a desktop or server environment, and a system for installing software.
Ubuntu releases a new version of this distribution on a regular schedule. Each version gets a number, like `20.04`, `22.04`, or `24.04`. When someone asks “what version of Ubuntu are you on?”, this is the number they want.
There’s also a second, separate thing called the kernel version, and people often confuse the two. We’ll clear that up near the end, because it genuinely matters. For now, just hold onto this: *the Ubuntu version (the distro release) and the kernel version are two different numbers.*
How do I check my Ubuntu version with `lsb_release`?
The clearest, friendliest command for this job is `lsb_release`. The name stands for Linux Standard Base release, but you don’t need to memorize that. Just think of it as “tell me about this release.”
Open your terminal (the text window where you type commands) and run:
“`bash lsb_release -a “`
The `-a` part means “all”, so it shows you everything it knows. You’ll see output something like this:
“`text No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 24.04.1 LTS Release: 24.04 Codename: noble “`
Let’s read this together, line by line:
- Distributor ID is the name of the distribution. Here it’s `Ubuntu`.
- Description is the full, human-friendly name, including whether it’s an LTS release.
- Release is the version number you’ll quote most often: `24.04`.
- Codename is a nickname for the release (here, `noble`). More on codenames in a moment.
If you only want the version number and nothing else, you can run `lsb_release -d` for just the description, or `lsb_release -r` for just the release number. But `-a` is the one to remember because it gives you the full picture at once.
How do I check the version using the `/etc/os-release` file?
Sometimes `lsb_release` isn’t installed, especially on a minimal server setup. No problem, because there’s a file that lives on almost every modern Linux system that holds the same information: `/etc/os-release`.
A file path that starts with `/etc/` simply points to the system’s configuration folder. To read this file, use the `cat` command, which prints a file’s contents to the screen:
“`bash cat /etc/os-release “`
You’ll see something like this:
“`text NAME=”Ubuntu” VERSION=”24.04.1 LTS (Noble Numbat)” VERSION_ID=”24.04″ ID=ubuntu PRETTY_NAME=”Ubuntu 24.04.1 LTS” VERSION_CODENAME=noble “`
The lines that matter most are:
- NAME — the distribution name (`Ubuntu`).
- VERSION — the full version text, including the codename.
- VERSION_ID — the clean version number you want: `24.04`.
The big advantage of this method is that `/etc/os-release` exists on most Linux distributions, not just Ubuntu. So once you learn it here, you can use the same trick on many other systems.
How do I check the version with `hostnamectl`?
There’s a third handy way, and it comes from a system component called systemd (a program that manages how modern Ubuntu systems start up and run). The command is:
“`bash hostnamectl “`
Its main job is to show information about your machine’s hostname, but it conveniently includes an Operating System line:
“`text Static hostname: my-server Icon name: computer-vm Operating System: Ubuntu 24.04.1 LTS Kernel: Linux 6.8.0-31-generic Architecture: x86-64 “`
Look at the Operating System line, and there’s your Ubuntu version. As a bonus, notice it also lists the Kernel line right below it, which is a perfect preview of the distinction we’re about to discuss.
A quick comparison of the three commands
Here’s a simple table to keep these straight:
| Command | What it shows | Best for |
|---|---|---|
| `lsb_release -a` | Distributor, Description, Release (e.g. 22.04), Codename (e.g. jammy) | The clearest, most readable output |
| `cat /etc/os-release` | NAME, VERSION, VERSION_ID, codename | Works on most Linux distros, even minimal servers |
| `hostnamectl` | Operating System line (plus kernel, architecture) | A quick all-in-one system snapshot |
Any of these three will answer the question. If you only learn one, learn `lsb_release -a`.
What is the Ubuntu codename, and why does it have a name?
You may have noticed words like `noble`, `jammy`, or `focal` in the output above. These are codenames, and every Ubuntu release gets one.
The codename always follows a fun pattern: an adjective plus an animal, with both starting with the same letter, like Jammy Jellyfish (22.04), Focal Fossa (20.04), and Noble Numbat (24.04). The letters even move forward through the alphabet over time.
Why does this matter to you? Because some software repositories and installation instructions refer to the codename instead of the number. If a tutorial says “add the repository for jammy,” that’s just another way of saying “for Ubuntu 22.04.” Knowing both forms saves you a lot of confusion.
How do I read the Ubuntu version number?
This is my favorite part, because once you understand it, the version number stops being a random label and starts telling you a story.
Here’s the secret: the Ubuntu version number is actually a date. It follows a YY.MM format, meaning year-dot-month.
- `24.04` = released in the 4th month (April) of 2024.
- `22.04` = released in April 2022.
- `23.10` = released in October 2023.
This means you can glance at any Ubuntu version and instantly know roughly how old it is. A system running `18.04`? That was April 2018, so it’s quite old now.
There’s a second layer to this. Ubuntu publishes a new release every six months, but not all releases are treated equally:
- LTS stands for Long Term Support. LTS releases get security updates and support for five years, which makes them the dependable, “set it and forget it” choice, especially for servers. LTS versions always come out in April of even-numbered years and carry the `.04` ending, like `20.04`, `22.04`, and `24.04`.
- Interim releases are the in-between versions (such as `23.10`). They include newer features but are only supported for about nine months, so they’re better suited to people who want the latest and greatest and don’t mind upgrading often.
So when you read `24.04 LTS`, you now know two things at a glance: it was released in April 2024, and it’s a Long Term Support version you can rely on for years. That single number tells you both how old your system is and how long it will keep receiving updates. Pretty neat for four digits.
Why does knowing my Ubuntu version even matter?
It might feel like a small detail, but your Ubuntu version affects several important things:
- Support status and end of life (EOL). Every release eventually reaches end of life, the point where it stops getting security updates. Running an EOL system is risky. Knowing your version tells you whether you’re still protected.
- Security updates. Staying on a supported version means you keep receiving patches that protect against newly discovered threats.
- Software compatibility. Some applications require a minimum Ubuntu version. Checking yours first saves you from frustrating “this won’t install” errors.
- Following the right tutorials. Commands and package names occasionally differ between releases. When you know your version, you can confidently follow guides written for it, instead of guessing.
In short, your Ubuntu version is a small piece of knowledge that prevents a lot of headaches.
Is the Ubuntu version the same as the kernel version?
This is the single most important clarification in this whole guide, so let’s slow down for it.
No, they are not the same thing. They are two separate numbers that update on two separate schedules.
- The Ubuntu version (like `24.04`) describes the whole operating system release, the entire bundle of software, tools, and settings that make up Ubuntu.
- The Linux kernel is the core engine deep inside the operating system. It’s the part that talks directly to your hardware, like your processor, memory, and disks. Its version looks completely different, something like `6.8.0-31-generic`.
To see the kernel version, you’d use a different command:
“`bash uname -r “`
Here’s the key idea: your Ubuntu version stays the same until you do a major upgrade, but the kernel can be updated separately and more frequently through regular system updates. So it’s completely normal for your Ubuntu version and kernel version to look unrelated. They’re describing different layers of the same system.
If you’d like a full walkthrough of checking and understanding the kernel specifically, I cover it in a companion guide.
Running Ubuntu on infrastructure you control
Knowing your Ubuntu version is most useful when you actually have the power to *act* on it, to upgrade, patch, or switch to a supported LTS release when the time comes. That’s much easier when you’re running on infrastructure that gives you full control.
At DarazHost, our VPS and dedicated server plans let you pick your own operating system, including your preferred Ubuntu LTS release (or another Linux distribution if you’d rather). You get full root access, the highest level of administrative control, so you can check your OS version, install updates, and keep your system supported and secure entirely on your own terms. With reliable, up-to-date infrastructure and 24/7 support standing by, you’re never left guessing or stuck. It’s a dependable home for beginners and seasoned admins alike.
Frequently Asked Questions
1. What’s the quickest command to check my Ubuntu version? Run `lsb_release -a` in your terminal. It gives you the clearest, most readable summary, including the description, release number, and codename, all in one place.
2. What if `lsb_release` isn’t installed on my system? That can happen on minimal server installations. Just use `cat /etc/os-release` instead. That file exists on almost every modern Linux system and shows your version under the `VERSION_ID` line.
3. How do I know if my Ubuntu version is LTS? Look at the description, for example `Ubuntu 24.04 LTS`. If it says LTS, it’s a Long Term Support release with five years of updates. LTS versions always end in `.04` and come out in even-numbered years.
4. Why is my kernel version different from my Ubuntu version? Because they’re different things. The Ubuntu version describes the whole operating system, while the kernel is the core engine inside it. The kernel updates separately and more often, so the two numbers naturally look different.
5. How do I find the Ubuntu codename, like jammy or noble? The codename appears in the Codename line of `lsb_release -a`, or the VERSION_CODENAME line of `/etc/os-release`. It’s a nickname some software instructions use instead of the version number.