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](https://b1490832.smushcdn.com/1490832/wp-content/uploads/2020/08/Open-DropDown-Arrow.png?lossy=2&strip=1&webp=1)
Open DropDown Arrow
Step 2. Click the Settings button to open the settings application.
![Press The Settings Button](https://b1490832.smushcdn.com/1490832/wp-content/uploads/2020/08/Press-The-Settings-Button.png?lossy=2&strip=1&webp=1)
Settings
Step 3. From the left panel, scroll down and open the Details menu.
![Open Details Menu](https://b1490832.smushcdn.com/1490832/wp-content/uploads/2020/08/Open-Details-Menu-1.png?lossy=2&strip=1&webp=1)
Open Details Menu
Step 4. From the left panel, select the About option.
![Choose the About Option](https://b1490832.smushcdn.com/1490832/wp-content/uploads/2020/08/Choose-the-About-Option.png?lossy=2&strip=1&webp=1)
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](https://b1490832.smushcdn.com/1490832/wp-content/uploads/2020/08/Ubuntu-Version-Using-Graphical-User-Interface.png?lossy=2&strip=1&webp=1)
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](https://b1490832.smushcdn.com/1490832/wp-content/uploads/2020/08/Check-Ubuntu-Version-Using-lsb-Command.png?lossy=2&strip=1&webp=1)
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](https://b1490832.smushcdn.com/1490832/wp-content/uploads/2020/08/Check-Ubuntu-Version-Using-lsb-d-Option.png?lossy=2&strip=1&webp=1)
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](https://b1490832.smushcdn.com/1490832/wp-content/uploads/2020/08/Check-Ubuntu-Version-Using-hostnamectl-Command.png?lossy=2&strip=1&webp=1)
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](https://b1490832.smushcdn.com/1490832/wp-content/uploads/2020/08/Check-Ubuntu-Version-Using-issue-File.png?lossy=2&strip=1&webp=1)
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](https://b1490832.smushcdn.com/1490832/wp-content/uploads/2020/08/Check-Ubuntu-Version-Using-os-release-File.png?lossy=2&strip=1&webp=1)
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](https://b1490832.smushcdn.com/1490832/wp-content/uploads/2020/08/Check-Ubuntu-Version-Using-lsb-release-File.png?lossy=2&strip=1&webp=1)
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.