The fastest way to check your Linux version

The command you need depends on what information you want. If you just need the kernel version — the core of the operating system — type uname -r into the terminal and press Enter. This tells you the version number of the Linux kernel itself.

If you need the distribution name and version — the specific Linux system you're running, like Ubuntu 22.04 or Fedora 38 — use cat /etc/os-release. This shows the full details of which Linux distribution you have and its version number.

Most people need the distribution version, not the kernel version. The distribution is what you actually installed on your computer. The kernel is the engine underneath it. They have different version numbers, and knowing which one you need saves time.

Key Takeaways

  • Type uname -r to see only the kernel version number.
  • Type cat /etc/os-release to see your Linux distribution name and version.
  • The distribution version (Ubuntu, Fedora, Debian) is usually what you need for software compatibility and support.
  • You can also use lsb_release -a on Ubuntu and Debian systems to see version information in a simpler format.
  • Different Linux systems store version information in different places, so the command that works depends on your distribution.

Using uname to check the kernel version

Open a terminal window and type uname -r. You will see output like 5.15.0-86-generic or 6.1.0. This is the kernel version number. The kernel is the core program that manages your hardware and lets other programs run.

If you want more detail about your system, type uname -a instead. This shows the kernel name, version, hardware platform, and other technical details all at once. You will see something like: Linux mycomputer 5.15.0-86-generic #86-Ubuntu SMP x86_64 GNU/Linux.

The kernel version matters when you are troubleshooting hardware problems or checking whether your system has a security update. Most of the time, though, you actually need the distribution version instead.

Checking your Linux distribution and version

Type cat /etc/os-release into the terminal. You will see output that includes lines like NAME="Ubuntu", VERSION="22.04.3 LTS", and VERSION_ID="22.04". This tells you exactly which Linux distribution you have and its version number.

The output also includes other useful information like the distribution's website, support page, and a unique identifier. If you only want to see the name and version without all the extra details, type cat /etc/os-release | grep "^NAME\|^VERSION=".

This method works on almost every modern Linux system. It is the most reliable way to find out which distribution you are running and whether you have the latest version.

Using lsb_release on Ubuntu and Debian

If you are running Ubuntu or Debian, you can type lsb_release -a for a simpler output. You will see the distributor ID, release number, codename, and description all in a clean format. For example: Release: 22.04 and Codename: jammy.

The codename is useful because some software and support pages refer to Ubuntu versions by their codename rather than the number. Ubuntu 22.04 is called "jammy", Ubuntu 20.04 is called "focal", and so on.

This command does not work on all Linux distributions — only on systems that follow the Linux Standard Base specification. If you get a "command not found" error, use cat /etc/os-release instead, which works everywhere.

Checking version information through the graphical interface

If you prefer not to use the terminal, you can find version information in the system settings. On Ubuntu, click the power button in the top right corner, then click "Settings". Go to "About" and you will see the Ubuntu version, kernel version, and other system details.

On Fedora, open "Settings" from the applications menu, then go to "About". You will see the Fedora version and kernel information displayed there.

On other distributions, the location varies. Look for a "System" or "About" section in your settings menu. The exact path depends on which desktop environment you are using — GNOME, KDE, XFCE, or another one.

Understanding what the version numbers mean

Linux version numbers follow a pattern. For Ubuntu, the format is usually YY.MM — so 22.04 means the version released in April 2022. Long-term support versions, marked as LTS, receive updates for five years instead of nine months.

Kernel version numbers are different. A number like 5.15.0-86 breaks down as: 5 is the major version, 15 is the minor version, 0 is the patch level, and 86 is the build number. You do not need to memorize this — you just need to know that higher numbers are newer.

When you are checking whether your system is up to date, look at the distribution version first. That is what determines which software packages you can install and how long you will receive security updates. The kernel version matters less for everyday use.

What to do if you cannot find your version

If cat /etc/os-release does not work, try cat /etc/lsb-release instead. Some older systems store the information there. If that does not work either, try hostnamectl, which shows the operating system and kernel version on systems using systemd.

If you are running a very old or minimal Linux installation, you might need to check the version file specific to your distribution. For Red Hat or CentOS, try cat /etc/redhat-release. For Slackware, try cat /etc/slackware-version. Each distribution keeps this information somewhere, but the location is not always the same.

If none of these commands work, you can always type uname -a to at least see the kernel version. That gives you a starting point for finding more information about your system.

Frequently Asked Questions

What is the difference between the kernel version and the distribution version?

The kernel is the core program that manages your hardware. The distribution is the complete operating system built around that kernel, including the package manager, desktop environment, and pre-installed software. You can have the same kernel version on different distributions, and different kernel versions on the same distribution.

Why do I need to know my Linux version?

You need it to check whether your system is up to date, to know how long you will receive security updates, and to confirm that software you want to install is compatible with your system. Support forums and documentation often ask for your version number to help troubleshoot problems.

How often should I check for updates?

Most Linux systems notify you automatically when updates are available. You do not need to manually check your version regularly. If you are troubleshooting a problem or installing new software, checking your version helps you understand what you are working with.

Can I upgrade from one Linux version to a newer one?

Yes, but the process depends on your distribution. Ubuntu and Fedora both have built-in upgrade tools you can access through the terminal or the settings menu. Always back up your important files before upgrading, and check your distribution's documentation for the specific steps.

What if my system shows a very old kernel version?

Open your system update tool and install the latest updates. On Ubuntu, open "Software Updater" or run sudo apt update && sudo apt upgrade in the terminal. On Fedora, use the Software application or run sudo dnf upgrade. After updating, you may need to restart your computer for the new kernel to take effect.