3v-Hosting Blog
How to Check Your Ubuntu Version
5 min read
Ubuntu, one of the most popular Linux distributions, releases new versions regularly, each with updated features, security patches, and software enhancements. Knowing the exact version of your Ubuntu system is crucial for installing compatible software, applying updates, or troubleshooting system issues. In this article, we will explore multiple ways to determine your Ubuntu version, primarily using command-line methods but also graphical interfaces where applicable.
Checking Ubuntu Version via Command Line
For most users, the command line is the quickest and most efficient way to find Ubuntu version details. Here are several commands to determine which version of Ubuntu is installed on your system:
Using lsb_release Command
The lsb_release command provides a simple way to retrieve distribution information. Run the following command in the terminal:
lsb_release -a
This will output details such as:
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
If you only need the release version, use:
lsb_release -r
This command is useful for quick checks and is supported across most Ubuntu versions.
Checking /etc/os-release File
Another way to check Ubuntu version command line style is by examining the /etc/os-release file. This method is useful for script automation:
cat /etc/os-release
Example output:
NAME="Ubuntu"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 22.04.3 LTS"
VERSION_ID="22.04"
This method provides structured information and is compatible with newer versions of Ubuntu.
Using hostnamectl
For systems running systemd, the hostnamectl command can also show Ubuntu version details:
hostnamectl
Look for the Operating System line, which indicates the version of Ubuntu:
Operating System: Ubuntu 22.04.3 LTS
This command is useful on both desktops and servers.
Checking /etc/issue File
Another lightweight method is to use the /etc/issue file:
cat /etc/issue
This outputs a concise Ubuntu version string:
Ubuntu 22.04.3 LTS \n \l
This file is often referenced in older systems or minimal installations.
Other useful articles in our Blog:
- How To Install Nginx on Ubuntu 22.04
- Network Configuration in Ubuntu 22.04
- Manually remount fstab without rebooting the Linux server
- How to install cPanel on Ubuntu 20.04
Using Graphical Interface (GUI)
If you prefer a graphical method, Ubuntu provides a way to find Ubuntu version details through system settings:
- Open Settings.
- Navigate to About under the System section.
- Look for the OS Name and Version.
This method is suitable for desktop users who are unfamiliar with terminal commands.
Determining Kernel Version
Sometimes, knowing the Ubuntu version alone is not enough; the kernel version may also be relevant. Use the following command to check it:
uname -r
Example output:
5.15.0-84-generic
For additional kernel details:
uname -a
This is especially useful for troubleshooting hardware compatibility issues.
Conclusion
Whether using command-line tools like lsb_release, /etc/os-release, or GUI-based methods, checking the Ubuntu version is a straightforward process. Understanding what version of Ubuntu do I have ensures proper package installation, security updates, and compatibility checks. The best approach depends on user preference, whether working in a terminal-heavy server environment or a user-friendly desktop setting. By using these methods, you can quickly show Ubuntu version and stay informed about your system's status.