
How to Check Your Ubuntu Version: 5 Simple Methods for Desktop and Server
Whether you’re troubleshooting an issue, installing new software, or performing routine system maintenance, knowing your exact Ubuntu version is crucial. The version number tells you which features are available, what software packages are compatible, and most importantly, whether your system is still receiving critical security updates.
Fortunately, finding this information is straightforward. Here are five simple methods you can use to check your Ubuntu version, suitable for both desktop users and server administrators working from the command line.
1. Using the Graphical User Interface (GUI) on Ubuntu Desktop
For those using Ubuntu’s desktop environment, this is the quickest and most visual method. You don’t need to open the terminal at all.
- Click on the system menu in the top-right corner of your screen (it usually shows power, network, and sound icons).
- Select “Settings” from the drop-down menu.
- In the Settings window, scroll down the left-hand sidebar and click on “About”.
Here, you will see a clear overview of your system. Look for the OS Name line, which will display the full version, such as “Ubuntu 22.04.3 LTS”. This screen also provides helpful information about your system’s hardware, like processor and memory.
2. The lsb_release
Command (The Universal Method)
The lsb_release
command is a classic and highly reliable tool for identifying your Linux Standard Base (LSB) information. It works on both Ubuntu Desktop and Server.
Open your terminal and type the following command:
lsb_release -a
Press Enter, and you will see a detailed output similar to this:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
- Description: This gives you the full version name, including the Long-Term Support (LTS) status. This is usually the most helpful line.
- Release: This shows the specific version number.
- Codename: This displays the development codename for your release (e.g., “Jammy Jellyfish”).
3. Checking the /etc/os-release
File
Another excellent command-line method is to view the contents of the /etc/os-release
file. This file contains operating system identification data and is a standard on most modern Linux systems.
To display its contents, use the cat
command in your terminal:
cat /etc/os-release
The output will be a list of variables defining your system’s identity:
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
...
The PRETTY_NAME
variable gives you a clean, human-readable version string, making this a very direct way to get the information you need.
4. The hostnamectl
Command
The hostnamectl
command is a modern tool used to query and change the system hostname, but it also provides a concise summary of your operating system. It’s quick, easy, and installed by default on recent Ubuntu versions.
Simply type the command in your terminal:
hostnamectl
You’ll receive a neat summary of your system, including its hostname, machine ID, and more. The line you’re looking for is Operating System:
Static hostname: your-hostname
Icon name: computer-vm
Chassis: vm
Machine ID: ...
Boot ID: ...
Virtualization: kvm
Operating System: Ubuntu 22.04.3 LTS
Kernel: Linux 5.15.0-88-generic
Architecture: x86-64
...
This method is especially useful because it also shows your Kernel version and system architecture at a glance.
5. Viewing the /etc/issue
File
For a no-frills, straight-to-the-point answer, the /etc/issue
file contains a simple string identifying the release. This method is particularly fast if you just need the version number without extra details.
Use the cat
command again:
cat /etc/issue
The output is typically a single, clean line:
Ubuntu 22.04.3 LTS \n \l
This is one of the oldest and most reliable ways to identify an Ubuntu system’s version directly from the terminal.
Why Your Ubuntu Version Matters
Knowing your version isn’t just for curiosity. It has practical security and functionality implications:
- Security Updates: Each Ubuntu release has a support lifecycle. Long-Term Support (LTS) releases receive security updates for five years, while standard releases are supported for only nine months. If you are on an unsupported version, you are no longer receiving patches for critical vulnerabilities.
- Software Compatibility: Many applications, especially those from third-party repositories or PPAs, require a specific Ubuntu version to function correctly. Checking your version first can save you from installation headaches.
- Access to New Features: Newer versions of Ubuntu come with updated software, improved performance, and new capabilities. Knowing your version helps you decide if it’s time to upgrade.
By using any of the methods above, you can quickly identify your Ubuntu version and make more informed decisions about managing and securing your system.
Source: https://www.redswitches.com/blog/how-to-check-your-ubuntu-version/