Hi everyone. Knowing which Linux version you are running comes up more often than you might think. An install guide may only work on a certain release, a download page may ask whether you need 32-bit or 64-bit, or someone on a forum asks for your system version before they can help. On Windows you would open the About screen. On Linux, a few simple terminal commands give you the same information.
In this guide I check the version on two systems at once, an Ubuntu 26.04 desktop and a Debian 12 server, so you can see the same methods work across distros. I also explain the difference between the distro version and the kernel version, two things people mix up all the time.
Machine 1 : Ubuntu 26.04.1 LTS (Desktop)
Machine 2 : Debian 12 ServerCheck the Distro Version with /etc/os-release
The most reliable way to check your Linux version is to read /etc/os-release. This file exists on almost every modern distro, from Ubuntu and Debian to Linux Mint, Fedora, and Arch.
The nice thing is that you do not need any extra tools. Just print the file with cat.
Print /etc/os-release

cat /etc/os-releasePRETTY_NAME (number 1) is the full name of the system, Ubuntu 26.04.1 LTS here. VERSION_ID and VERSION (number 2) give the version number along with the code name, Resolute Raccoon. ID=ubuntu and ID_LIKE=debian (number 3) tell you Ubuntu is based on Debian, which is why so many Debian guides also work on Ubuntu.
Note: LTS means Long Term Support, a release that gets security updates for years. For servers and work machines, an LTS release is usually the safest choice.
Check the Version with lsb_release
If os-release feels too long, lsb_release shows the version details in a shorter, tidier format.
It comes preinstalled on Ubuntu and Debian. On some other distros you may need to install it first.
Run lsb_release -a

lsb_release -aThe first line, No LSB modules are available (number 1), makes a lot of beginners think something is broken. It is not. This message is normal and you can ignore it. The useful part is below it (number 2): Description says Ubuntu 26.04.1 LTS, Release says 26.04, and Codename says resolute.
Check the Version with hostnamectl
hostnamectl is really meant for setting your computer’s name, but it also shows the OS version, kernel version, and architecture in one place.
Its full output is fairly long, so I filtered it with grep to show only the lines that matter here.
Show the OS, kernel, and architecture

hostnamectl | grep -E 'Operating|Kernel|Architecture'One command gives you three key facts (number 1). Operating System is Ubuntu 26.04.1 LTS, Kernel is Linux 7.0.0-44-generic, and Architecture is x86-64, which means a 64-bit system.
Check the Kernel Version with uname
The distro version and the kernel version are two different things. The distro version, like Ubuntu 26.04, describes the whole operating system. The kernel is the core that talks to your hardware, and a single Ubuntu release can go through several kernel versions during its lifetime.
You usually need the kernel version when installing drivers, such as WiFi or graphics drivers, because they have to match the kernel you are running.
Use uname -r and uname -m

uname -r
uname -muname -r shows the kernel version, 7.0.0-44-generic (number 1). uname -m shows the architecture, x86_64 (number 2). x86_64 means a 64-bit system that can run 64-bit software. If you see aarch64 instead, your device is ARM-based, like a Raspberry Pi.
Check the Debian Version
Debian keeps a more detailed version number in a file of its own, /etc/debian_version. It is handy because lsb_release on Debian only shows the major version.
I checked it straight from the Ubuntu desktop over SSH, so I did not have to switch machines.
Check /etc/debian_version and lsb_release on Debian

ssh -p 2222 mamang@192.168.56.20 'cat /etc/debian_version; lsb_release -a'debian_version shows the full version, 12.15 (number 1), while lsb_release only says Debian GNU/Linux 12 (bookworm) (number 2). So this server runs Debian 12 with its 15th point release. I cover connecting to a server like this in the guide on configuring an SSH server on Debian 12.
Common Problems and How to Fix Them
Checking your Linux version rarely goes wrong, but a few messages tend to confuse beginners. Here is what they mean.
If you use a different distro and get different output, reading /etc/os-release is still the safest bet, since it is almost always there.
lsb_release: command not found
The command is not installed on your distro. Use cat /etc/os-release instead, or install the lsb-release package.
No LSB modules are available
This is not an error. It is normal on Ubuntu and Debian, and you can ignore it.
The os-release version and the kernel version look nothing alike
That is expected. Distro versions and kernel versions use separate numbering and do not need to match.
Not sure if the system is 32-bit or 64-bit
Run uname -m. x86_64 or aarch64 means 64-bit. i686 means 32-bit.
That is how to check your Linux version from the terminal. Use cat /etc/os-release or lsb_release -a for the distro version, and uname -r for the kernel. If you want a command to run automatically every day, for example a backup with rsync, see how to create cron jobs with crontab. If you get confusing results on another distro, share them in the comments.












