The fastest way to check your Linux version
The simplest command to see your Linux version is lsb_release -a. Open a terminal and type it, then press Enter. You will see the distributor ID (which Linux you are running — Ubuntu, Fedora, Debian, etc.), the release number, and the codename.
If that command does not work on your system, try cat /etc/os-release instead. This reads a file that nearly every modern Linux distribution keeps in the same place. It shows the same information in a slightly different format, with labels like NAME, VERSION, and VERSION_ID.
Both commands work from any directory and require no special permissions. You do not need to be logged in as root or use sudo. The information they show is the same — just pick whichever one your system recognizes first.
Key Takeaways
- Run lsb_release -a in a terminal to see your distribution name, version number, and release codename in one command.
- If lsb_release does not work, use cat /etc/os-release to read the same information from a system file.
- Both commands show the distribution (Ubuntu, Fedora, Debian) and the specific version number you are running.
- You can also check the kernel version separately with uname -r if you need to know what kernel your system is using.
Understanding the difference between distribution version and kernel version
When you check your Linux version, you are usually looking at two different things. The distribution version is the release number of Ubuntu, Fedora, Debian, or whichever Linux you installed — for example, Ubuntu 22.04 or Fedora 39. The kernel version is the core of the operating system that manages hardware and runs programs.
The commands above show your distribution version. If you want to see the kernel version instead, type uname -r. You might see something like 5.15.0-86-generic. The first number (5) is the major version, the second (15) is the minor version, and the rest identifies the specific build your system is running.
Most of the time, you need the distribution version — that is what matters when you are installing software or following instructions written for your Linux. The kernel version matters mainly if you are troubleshooting hardware problems or need to know if a specific driver will work.
Other commands that show version information
hostnamectl is another option, especially on systems using systemd (which includes most modern distributions). Type it in a terminal and you will see the operating system name, version, and kernel version all at once. This command is often cleaner and easier to read than the others.
cat /etc/lsb-release works similarly to lsb_release -a but shows the output in a file format. Some older systems have this file but not the lsb_release command itself, so it is worth trying if the command does not work.
If you are running a Red Hat-based distribution like CentOS or RHEL, you can also check cat /etc/redhat-release or cat /etc/system-release. These files contain the version information specific to those distributions.
Checking version information through the graphical interface
If you prefer not to use the terminal, most Linux distributions let you check the version through the settings menu. In Ubuntu, open Settings, scroll to the bottom, and click "About". You will see the Ubuntu version, kernel version, and system details without typing any commands.
In Fedora, open Settings, go to Details, and the version appears near the top. GNOME-based desktops (used by Ubuntu, Fedora, and others) all follow roughly the same path: Settings → About or Settings → Details.
If you are using a different desktop environment like KDE or XFCE, the path varies, but the principle is the same — look for "About" or "System Information" in the main settings menu. The graphical method shows less technical detail than the terminal commands, but it is enough if you just need to know which version you are running.
Why you might need to know your Linux version
Software repositories and package managers often require a specific distribution and version. When you install a program using apt (on Ubuntu and Debian) or dnf (on Fedora), the system checks that the package is compatible with your version. If you are following installation instructions online, they usually specify which versions they work with — knowing yours lets you confirm you are on the right track.
Security updates are also tied to your version. Ubuntu 22.04 receives updates on a different schedule than Ubuntu 20.04, and Fedora versions are supported for only about 13 months. Knowing your version tells you how long your system will receive security patches.
Hardware drivers and kernel modules sometimes depend on the kernel version as well. If you are installing a graphics driver or a network adapter driver, the manufacturer often lists which kernel versions they support. Checking your kernel version with uname -r helps you download the right driver.
Checking version on systems without lsb_release
Minimal Linux installations, embedded systems, and some specialized distributions do not include the lsb_release command. If you type it and get "command not found", try cat /etc/os-release first — this file exists on nearly everything modern.
If that does not work either, look for distribution-specific files. Alpine Linux uses cat /etc/alpine-release. Arch Linux has cat /etc/arch-release. These files are usually in /etc/ and named after the distribution. You can list all files in that directory with ls /etc/*-release to see what your system has.
As a last resort, uname -a shows the kernel name, version, and hardware architecture. It does not tell you the distribution name, but it confirms you are running Linux and shows the kernel version, which is useful information on its own.
Frequently Asked Questions
What is the difference between Ubuntu 22.04 and kernel version 5.15?
Ubuntu 22.04 is the distribution version — the specific release of Ubuntu you installed. Kernel version 5.15 is the core operating system component that came with it. Ubuntu 22.04 ships with kernel 5.15 by default, but you can update the kernel separately while staying on Ubuntu 22.04.
Do I need to be root to check my Linux version?
No. All the commands mentioned — lsb_release, cat /etc/os-release, uname, and hostnamectl — work for any user without special permissions. You do not need sudo or root access to read version information.
Why does my system not have the lsb_release command?
Some minimal or specialized distributions do not install it by default. Use cat /etc/os-release instead, which works on nearly all modern Linux systems. If you need lsb_release specifically, you can install it with your package manager (apt install lsb-release on Ubuntu, dnf install redhat-lsb-core on Fedora).
How often should I check if my Linux version is up to date?
Check your version if you are installing software that specifies version requirements, or if you want to know when your system stops receiving security updates. You do not need to check regularly — your package manager tells you when updates are available.