TechMediaToday
How to

How to Check the OS Version in Linux?

Linux isn’t for everyone! But for those who happen to like the look and feel of this operating system, it can be quite a useful platform.

However, there are those who are trying a Linux-based OS for the first time and don’t know how to make their way around; things can be pretty challenging at the start. If you happen to be one such person, you’ve come to the right place. 

Here we will show you how you can check the operating system version in Linux. But before we do, the thing that needs to be understood is that there are different variants of Linux, known as Linux distribution – OpenSUSE, SUSE, Ubuntu, CentOS, and Fedora.

Regardless of the variant, though, here’s what you need to do in order to check your Linux OS version. Before reading this article we recommend you to check out How To Wiki for more how to related articles. 

Need to Check Linux OS Version? Here’s How You Can

To make it easy for you to do it on your own: we have mentioned the methods here.  

Method 1

  1. Open the terminal application, also known as bash shell.
  2. For logging into a remote server with the ssh, type: ssh user@ server – name
  3. Type in the following command: $ cat /etc/os-release

You will get the following, or similar, result:

NAME=”Ubuntu”

VERSION=”20.04.1 LTS (Focal Fossa)”

ID=ubuntu

ID_LIKE=debian

PRETTY_NAME=”Ubuntu 20.04.1 LTS”

VERSION_ID=”20.04″

HOME_URL=”https://www.ubuntu.com/”

SUPPORT_URL=”https://help.ubuntu.com/”

BUG_REPORT_URL=”https://bugs.launchpad.net/ubuntu/”

PRIVACY_POLICY_URL=”https://www.ubuntu.com/legal/terms-and-policies/privacy-policy”

VERSION_CODENAME=focal

UBUNTU_CODENAME=focal

Method 2

You can also use the LSB (Linux Standard Base) command to find out what OS version you are using: 

  1. Open the terminal application, also known as bash shell.
  2. For logging into a remote server with the ssh, type: ssh user@ server – name
  3. Type in the following command: $ lsb_release -a

This time, you will get a similar output as the following:

LSB Version: :core-4.1-amd64:core-4.1-noarch

Distributor ID: CentOS

Description: CentOS Linux release 7.4.1708 (Core) 

Release: 7.4.1708

Codename: Core

Method 3

  1. Open the terminal application, also known as bash shell.
  2. For logging into a remote server with the ssh, type: ssh user@ server – name
  3. Type in the following command: $ hostnamectl

You will get a similar output as the following:

Static hostname: nixcraft-www-42

         Icon name: computer-vm

           Chassis: vm

        Machine ID: beb217fbb4324b7d9959f78c279e6599

           Boot ID: 10f00cc5ca614b518a84d1793d0134bc

    Virtualization: qemu

  Operating System: Ubuntu 16.04.3 LTS

            Kernel: Linux 4.10.0-42-generic

      Architecture: x86-64

Why Would You Need to Find Out Your Linux OS Version?

Now that you know how to find out what version of Linux OS you are using, let’s understand the situations where you might be required to figure out the OS version. 

You might have acquired, or want to acquire a piece of software that is only compatible with one particular Linux OS version. You will need to know what the OS version is that you are using so that you can go ahead and install the software. 

Additionally, you will not be able to upgrade the OS version if you don’t know the OS version you are currently using. 

Benefits of Knowing Your Linux OS Version

Here are some benefits of knowing your Linux OS version. 

  • You Are More Aware

The best thing about staying in the know of your OS version is that you cannot be tricked into something by someone with an ill will of some sort.

  • You Can Participate in Conversations

We all know how frustrating it can be to be in a conversation where you have no idea about what’s being spoken. Knowing your Linux OS version will help you partake in discussions with your friends or colleagues if the need arises.

  • Security Patches

In case there are any security patches that you might need to install in your Linux OS, you will be required to know what the operation system version that you are using is. 

Conclusion

Well, there you have it! Hopefully, you will consider yourself more knowledgeable now than you were before you started reading this. It can be easy for someone to fool you if you don’t have information about a particular product. 

Considering the fact that Linux is not a GUI-based operating system like Windows, it can be confusing to make your way around, but now that you know how to check your Linux OS version, you will be more aware henceforth.

Also Read:

Leave a Comment