How to check the OS and Linux Version

Are you looking for ways to find the OS details of your system? Here are the command-line ways of checking the OS and Linux version from the Terminal.

It is essential to know the currently installed operating system, its version, and also the Linux kernel version on your machine to install the correct packages and apply the appropriate security patches. Not just that, being a system administrator, knowing the system details also comes in handy for troubleshooting issues.

In this guide, we are going to walk you through various methods to determine your Linux version.

Checking the OS and Linux version

We have two main ways:

  • Via a graphical user interface
  • Via the command line way (recommended)

Let’s get started.

Method 1: Graphical User Interface Way

Typically, using a graphical user interface to perform any task is considered the most comfortable way, but you get limited information. Most of the Linux distros have an About or System Information app that should give you necessary OS details. In the below example, we fetch details from the Ubuntu system.

Step 1. From Ubuntu’s top panel, click on the Dropdown arrow.

Open DropDown Arrow
Open DropDown Arrow

Step 2. Click the Settings button to open the settings application.

Press The Settings Button
Settings

Step 3. From the left panel, scroll down and open the Details menu.

Open Details Menu
Open Details Menu

Step 4. From the left panel, select the About option.

Choose the About Option
Choose the About Option

Step 5. You should now see the details of your system. As you see in the below screenshot, I could see RAM size, Processor type, Graphics info, Desktop Environment version (GNOME in my case), OS architecture, and disk size.

Ubuntu Version Using Graphical User Interface
About

Method 2: Command Line Way

This method is the most favorite method among Linux users because sometimes you may be working on a machine that has no graphical user interface installed, such as Ubuntu Server. Note that several commands can be used. We discuss the best commands to use.

lsb command

Launch the Terminal. On Ubuntu machines, this can be done by pressing Ctrl+Alt+T simultaneously. Enter the following command in the Terminal and press enter.

lsb_release -a

Check Ubuntu Version Using lsb Command
Using lsb command

The command will print some details about the currently installed Linux distro. However, if you need to get the current version, only use the -d option with the lsb_release command:

lsb_release -d

Check Ubuntu Version Using lsb -d Option
Check the OS Version Using lsb -d Option

hostnamectl Command

Another command you can use to preview some information about your system is the command used to get the machine hostname.

hostnamectl

Check Ubuntu Version Using hostnamectl Command
Using hostnamectl Command

As you can notice, the hostnamectl command will preview some additional information about your system, including the Linux distro version and Linux Kernel version too.

/etc/issue File

Another way is to open a file in the path /etc/issue file that holes the OS information:

cat /etc/issue

Check Ubuntu Version Using issue File
Using issue File

/etc/os-release File

There is yet another file in the path /etc/os-release that holds some info about the currently installed operating system.

cat /etc/os-release

Check Ubuntu Version Using hostnamectl Command
Using hostnamectl Command

/etc/os-release File

Finally, you can also use the lsb-release File to view the current system version.

cat /etc/lsb-release

Check Ubuntu Version Using lsb-release File
lsb-release File

Conclusion

Those are all the ways you can use to fetch the OS version and Linux version details from your system. I hope the tutorial helped you in learning one or two things about the Linux command-line usage. Feel free to pick the one you feel comfortable with. That’s it for now.

Hend Adel
Hi! I'm Hend Adel, a freelancer technical geek with successful experience in Database, Linux and many other IT fields. I help to build solutions to suit business needs and creating streamlined processes. I love Linux and I'm here to share my skills via FOSS Linux! Thanks for reading my article.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

STAY CONNECTED

23,312FansLike
385FollowersFollow
16SubscribersSubscribe

LATEST ARTICLES

MUST READ

Buyers who wish to go for a machine that is based on Linux often show interest in Chromebooks due to the form factor and extended battery life capabilities. Although ChromeOS power these machines, users can still miss out on a more genuine Linux experience. For those who happen to agree, the new Lemur Pro by System76 might get some heads turning.
Linux is growing faster than ever. As per the latest report, there is a drop in the Windows 10 market share for the first time, and Linux's market share has improved to 2.87% this month. Most of the features in the list were rolled out in the Pop OS 20.04. Let's a detailed look into the new features, how to upgrade, and a ride through video.

Ubuntu 19.10 (Eoan Ermine) Beta Installation and Overview

It may be early, but I've been looking forward to the release of Ubuntu 19.10 for some time now. As an impatient person, and promised readers in the FOSSLinux article announcing the release of Eoan Ermine that we would provide you a review of Ubuntu 19.10 Eoan Ermine - Beta.  So, here it goes.

Installing multiple Linux distros on a USB drive

A bootable Linux USB drive, which also referred to as a Live USB drive, is a drive containing files that enable a computer to boot into a specific Linux distro. It is most commonly used to test-drive various Linux distros before installing on the computer for use as a daily driver.

10 ways to use the Chown command with examples

Any file in a Linux system belongs to a particular owner(s) and a group. It is one of the many features that maintain security in Linux systems. For example; If a file belongs to say UserA, then UserB cannot manipulate the data depending on any additional permissions set unless the user has permission to do that.

[Guide] apt vs apt-get commands, and which one to use?

Most Linux users, both veterans, and newbies, often get confused about what the difference between the Linux commands apt, and apt-get are and when they should use one or the other.