How to Check the Linux OS Version (6 Ways)

GNU/Linux OSes are some of the best replacements for Windows and macOS because they have gotten impressively capable over the years. Not just the Linux kernel but a lot of components like desktop environments and display servers are now more capable than they were before. With too many distro releases, keeping track of Linux versions could be challenging, especially on rolling releases. So, here are six ways to check the Linux version number easily on your PC.

1. Check Linux Version using lsb_release Command

“LSB” stands for Linux Standard Base and the lsb_release command was specially developed to allow Linux users to check their Linux OS version; that’s all it does. To check your Linux operating system’s version, type the following command in the terminal and hit enter.

lsb_release -a
lsb release command Linux

The -a stands for “all” in the command, meaning you are asking the “lsb_release” command to list all the details about your Linux distro. You could also use -d, -r, and -c to find out the description, release, and codename using this command, respectively.

2. Check Linux OS Version using Neofetch

Unlike other commands that only display text, Neofetch is a fancy command that displays the ASCII art of the logo of the distro you are using. In addition to the artwork, it shows everything you would need to know about the distro, including the Linux kernel version, resolution, desktop environment, processor, GPU, and memory. Now, the Neofetch command doesn’t come installed by default, so you’d need to install it first to check your version number. It can be installed using the following commands, depending on which distribution and package manager you’re using.

# For Ubuntu/Debian-based distros

sudo apt install neofetch

# For Fedora/CentOS

sudo dnf install neofetch

# For Arch-based distros

sudo pacman -S neofetch

# For OpenSUSE

sudo zypper install neofetch

Once installed, type neofetch in the Linux command line and hit Enter. Here’s what you will see as the output:


3. Check Linux Version using Cat Command

The cat command in Linux stands for “concatenate,” and this highly useful Linux command is specifically used to display file contents in the terminal. To get the details about the Linux OS version using the cat command, we need to target the “os-release” file that resides in the /etc directory inside the root. Here’s how:

cat /etc/os-release
Cat command os-release linux

4. Check Linux Version using Uname Command

Most of the aforementioned commands do not display the kernel version. However, if you specifically want to check the kernel version of your Linux OS, uname is the only command you need.

“uname” is short for Unix Name and is specifically meant to display details about Linux desktops. It comes built into Linux, and here is how you use the command:

uname -a
uname command - check os version in Linux

5. Check Linux Version using Hostnamectl Command

Last but not least command, you can also use the “Hostnamectl” command to find out the Linux OS version. As the name suggests, this command is used to display the hostname of the distro. This command will only work with sudo privileges:

sudo hostnamectl
hostnamectl linux

6. GUI Method to Check the Linux OS Version

If you are new to Linux, you probably don’t like the terminal much because it hasn’t grown on you yet. Hence, if you don’t like using the terminal and are looking for a way to find out the Linux version, it’s possible with this GUI method.

1. Go to Settings on your Linux PC.

2. Scroll all the way down and open the “About” section.

3. Here, you should see the details about the installed Linux distro.

Pop!OS about section - check os version linux

Bear in mind that the Settings app on your distro may look vastly different from ours. If you don’t see the “About” section right away, it’s usually located in the settings and you may need to dig a bit deeper.

Frequently Asked Questions

1. How do I find my current OS version?

There are different commands like lsb_release, uname, Hostnamectl, cat, and neofetch that you can use to check the current version on Linux OS.

2. How to check Linux version on Ubuntu?

To check the Linux version on Ubuntu, go to the command terminal and execute the “lsb_release” command.

comment Comments 0
Leave a Reply