The fastest way to check your Linux version
The command you need depends on what you want to know. If you need the kernel version — the core of the operating system — type uname -r and press Enter. If you need the distribution name and version — which Linux flavor you're running, like Ubuntu or Fedora — use cat /etc/os-release.
Most of the time, one of these two commands answers your question. The kernel version tells you how up-to-date your system's core is. The distribution version tells you which Linux variant you have and whether you're on a current release or an older one. You'll use different commands depending on which one matters for what you're trying to do.
Key Takeaways
- Type uname -r to see your kernel version, which is the core of Linux itself.
- Type cat /etc/os-release to see your distribution name and version, like Ubuntu 22.04 or Fedora 38.
- The hostnamectl command shows both your distribution and kernel in one readable output.
- Different Linux distributions store version information in different files, so knowing which command to use saves time.
Checking your kernel version with uname
The uname command shows information about your system's kernel. Open a terminal and type uname -r, then press Enter. You'll see a string like 5.15.0-56-generic or 6.1.0-13-generic. The first number is the major version, the second is the minor version, and the rest tells you about patches and your system type.
If you want more detail, type uname -a instead. This shows the kernel name, your computer's hostname, the kernel release, the kernel version, the hardware platform, and the operating system. It's more information than you usually need, but it's there if you're troubleshooting or setting up software that has specific kernel requirements.
Finding your distribution name and version
The distribution is the packaged version of Linux you installed — Ubuntu, Fedora, Debian, CentOS, or something else. To see which one you have and what version, type cat /etc/os-release and press Enter. You'll see lines like NAME="Ubuntu" and VERSION_ID="22.04". This file works on most modern Linux systems.
If that command doesn't work on your system, try lsb_release -a. This older command does the same thing but isn't installed on every distribution. If neither works, your system is either very old or very minimal, and you may need to check the documentation for your specific Linux flavor.
Using hostnamectl for a quick overview
The hostnamectl command shows your distribution, kernel version, and hostname all in one readable output. Type hostnamectl and press Enter. You'll see lines labeled "Operating System", "Kernel", and "Architecture" — exactly what most people need to know. This command works on systems that use systemd, which includes most modern Linux distributions.
This is often the easiest option if you just want to see what you're running without digging through multiple commands. The output is formatted for humans rather than for scripts, so it's clearer than reading raw files.
Checking version information in the terminal
When you open a terminal, some Linux systems show version information in the welcome message. Look at the first few lines after you log in — you might see something like "Welcome to Ubuntu 22.04.1 LTS" or "Fedora Linux 38". This is the fastest check if the information is already on your screen.
If you don't see it, or if the welcome message scrolls past too quickly, use one of the commands above. The welcome message is just a convenience; the actual version information lives in files and kernel data that the commands read directly.
What to do if a command doesn't work
If you type a command and get "command not found", your system doesn't have that tool installed. Try a different command from the ones listed above. Start with uname -r and cat /etc/os-release — these work on nearly every Linux system because they're part of the core.
If you're on a very minimal system or a custom Linux build, you might need to check your system's documentation. Some embedded or specialized Linux systems don't include standard tools. In that case, look for a file called /etc/issue or /etc/system-release, which some systems use instead of os-release.
Why knowing your version matters
Software often requires a minimum kernel version or a specific distribution. When you're installing a program, updating your system, or troubleshooting a problem, knowing your exact version helps you find the right instructions. A solution for Ubuntu 20.04 might not work on Ubuntu 22.04, and a program built for kernel 5.10 might not run on kernel 4.15.
Version information also tells you whether your system is receiving security updates. Long-term support versions like Ubuntu 22.04 LTS get updates for years, while regular releases stop getting updates after a few months. Checking your version helps you understand how long your system will be supported.
Frequently Asked Questions
What's the difference between kernel version and distribution version?
The kernel is the core of Linux itself — the part that talks to your hardware and manages memory and processes. The distribution is the package around it, including the package manager, default programs, and configuration. You can have Ubuntu 22.04 running kernel 5.15 or kernel 6.1. Both numbers matter, but for different reasons.
Do I need to update my kernel version?
Your system usually updates the kernel automatically when you run system updates. Check your distribution's update instructions rather than updating the kernel by itself. Kernel updates can affect hardware compatibility, so letting your distribution manage them is safer than doing it manually.
Can I run the same software on different kernel versions?
Usually yes, but not always. Most software works across a range of kernel versions. Some programs need a minimum kernel version because they use newer features. Check the software's requirements before installing. If you're stuck on an old kernel version, you might not be able to run the newest software.
What does "LTS" mean in the version number?
LTS stands for Long-Term Support. Ubuntu LTS versions get security updates for five years instead of nine months. If you see "22.04 LTS", you're on a version that will be supported until 2027. Regular releases without LTS in the name stop getting updates much sooner.
Is there a graphical way to check the version without using the terminal?
Yes. On most Linux desktops, open Settings or System Settings, then look for "About" or "System Information". You'll see your distribution name and version. This doesn't always show the kernel version, so you may still need the terminal for that detail.