The Wayback Machine - https://web.archive.org/web/20240904230046/https://www.geeksforgeeks.org/how-to-check-the-os-version-in-linux/
Open In App

Check the OS Version in Linux

Last Updated : 16 May, 2024
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

When we want to install the Software on our system, first we must know whether our current Operating System is supporting this version of the software or not. In Windows, we can easily check it as Windows is based on a GUI-based Operating System.

But we prefer to use the Command line instead of the GUI in an Operating System like Linus/Unix. In this article, we will learn how to check the details of the Operating System we are using in Linux. We will work with one of the Linux distributions of Linux named UBUNTU. We will discuss How to check the Version of Ubuntu.

5 Simple Ways to Check the Linux OS Version:

In this article, we will work on one of the distributions of Linux, which is Ubuntu. So we will discuss different ways to Check the Version of Ubuntu.

1) Using the os-release file available in Linux’s etc directory to check the Version of Ubuntu.

We can check the Linux Operating System (OS) information by running the below command.

cat /etc/os-release 

Output:

using-the-os-release-file-available-in-linux’s-etc-directory-to-check-the-version-of-ubuntu

used `cat /etc/os-release` for displaying the Version of Ubuntu

To only view the name and version of Ubuntu or Red Hat Linux, we can filter out it by using the `grep` command.

grep '^VERSION' /etc/os-release
grep -E '^(VERSION|NAME)=' /etc/os-release


using-the-os-release-file-available-in-linux’s-etc-directory-to-check-the-version-of-ubuntu

only view the name and version of Red Hat Linux

In this ex, we checked our name and version of Red Hat Linux.

2) Using the `lsb_release` Command to Check the OS Version of Ubuntu.

LSB Stands for Linux Standard Base, we can check the Linux Operating System (OS) with the sing lsb_release command.

lsb_release -a

Output:

using-the-lsb_release-command-to-check-the-os-version-of-ubuntu

used `lsb_release -a` to display the ng OS version in linux 

3) Using the `hostnamectl` Command to Check Version of Ubuntu.

We can use the `hostnamectl` command to check the Linux Operating System (OS) or we can say to check the version of Ubuntu.

hostnamectl

Output:

using-the-hostnamectl-command-to-check-version-of-ubuntu

used hostnamectl for displaying the OS version of Ubuntu in Linux

4) `uname` Command in Linux to Check the Version of Ubuntu.

To print the version of the Linux kernel we can use the `uname` command.

uname -r
`uname`-command-in-linux-to-check-the-version-of-ubuntu

version of Linux kernel

5) Using GUI (Graphical User Interface) to Check the Version of Linux.

We have 3 Simple Steps to find OS version of Ubuntu in Linux.

Step 1: Click on the start menu application.

As shown below.

using-gui-(graphical-user-interface)-to-check-the-version-of-linux

click the application point by the yellow arrow

Step 2: Search Settings kernel on the Search bar.

Click on settings as shown below.

using-gui-(graphical-user-interface)-to-check-the-version-of-linux

click the application pointed by the yellow arrow

Step 2: click on About.

As shown below. And we can easily see the version of Ubuntu.

using-gui-(graphical-user-interface)-to-check-the-version-of-linux

click on About to view the details

Conclusion

It is essential to know the operating system version when we are installing software or performing any kind of system update. Checking the OS version in Windows is straightforward due to the GUI (Graphical User Interface), whereas in Linux users have several ways to check the OS version including OS-release file, lsb_release command, hostnamectl command, or the GUI (Graphical User Interface). One must understand the importance of knowing the CLI methods to find out the OS version as Linux is mostly used for CLI, by this users can troubleshoot issues, install new software, and keep the system updated.

Check the OS Version in Linux – FAQs

How to check OS Version on Linux using command line?

You can use various commands like “cat /etc/os-release”, “lsb_release -a”, “hostnamectl”, or “uname -r” to check the OS version on Linux via the command line.

How to Check Current OS Version in Linux?

To check the current OS version in Linux, open the command line and use one of the commands like “cat /etc/os-release”, “lsb_release -a”, “hostnamectl”, or “uname -r”.

How to check Linux version in Putty?

In PuTTY, you can use commands like “cat /etc/os-release”, “lsb_release -a”, “hostnamectl”, or “uname -r” to check the Linux version via the command line.

What is the latest Linux OS version?

The latest Linux OS version may vary depending on the distribution. You can check the official website of the Linux distribution you’re interested in for the latest version information.

how to Check OS version in Linux Red Hat?

To check the OS version in Linux Red Hat, you can use commands like “cat /etc/redhat-release”, “lsb_release -a”, “hostnamectl”, or “uname -r” in the command line.



Similar Reads

How to Check Kernel Version in Linux
The kernel in the Linux Operating System is the core brain component of OS. Kernel in Linux OS is mainly a bridge between the hardware and the software layers. All the necessary services and the functionalities of the OS and the application are been provided by Kernel. The kernel has its version which differs according to the system. Knowing this v
5 min read
How to Check the MySQL Version in Linux
Checking the MySQL version on a Linux system is a fundamental task for database administrators and developers. Knowing the MySQL version is important for troubleshooting, compatibility, and applying the appropriate updates. In this article, we'll explore various methods to easily determine the MySQL version running on your Linux server, whether you
3 min read
How to Download and Install Python Latest Version on Linux?
Python is a widely-used general-purpose, high-level programming language. This article will serve as a complete tutorial on How to download and install Python latest version on Linux Operating Systems. On every Linux system including following OS, Ubuntu Linux Mint Debian openSUSE CentOS Fedora and my favourite one, Arch Linux. You will find Python
3 min read
How to Hide Nginx Server Version in Linux?
Here we will see how to hide the Nginx server version from error pages and the “Server HTTP” response header field in Linux. This is one of the most important security recommendations for your Nginx HTTP and proxy server. The Nginx will show the version on error pages and in the “Server” response header field. Hiding The Nginx version: To hide the
1 min read
How to Find openSUSE Linux Version?
openSUSE is well known for its GNU/Linux-based operating systems, mainly Tumbleweed, a tested rolling release, and Leap, a distribution with Long-Term-Support(LTS). MicroOS and Kubic are new transactional, self-contained distributions for use as desktop or container runtime. Here we figure out which version of the openSUSE Linux distribution is ins
2 min read
How to Find Out Postfix Mail Server Version in Linux?
The most commonly used implementations of SMTP in most Linux distros are Sendmail and Postfix. Postfix is an open-source mail-transfer agent that was originally developed as an alternative to Sendmail and is usually set up as the default mail server. We'll show you how to figure out what version of the Postfix mail system is running on your Linux s
1 min read
How to Update sudo Version on Linux
In the Linux Operating System, we use different administrative commands to control and manage the system. To perform the administrative work on the system, we use sudo as the main primary command. sudo in Linux is the command utility that allows us to execute the commands with superuser privileges. The main goal of the sudo command is to allow non-
6 min read
How to Check Your Ubuntu Version: A Guide
Ubuntu is a Linux distribution built on Debian that is mostly comprised of software that is open-source and free. Ubuntu is officially available in three editions: Desktop, Server, and Core for IoT devices and robots. Canonical, a British corporation, and a group of other developers work on the operating system under a meritocratic governance parad
4 min read
How to download and install Python Latest Version on Android
Python is a widely-used general-purpose, high-level programming language. This article will serve as a complete tutorial on How to download and install Python latest version on Android. Python can run on Android through various apps from the play store library. This tutorial will explain how to run python on Android using Pydroid 3 - IDE for Python
2 min read
Juumla - Tool Designed To Identify And Scan For Version, Config Files In The CMS Joomla
Juumla is an open-source content management system(CMS). It assists you to build powerful dynamic websites and applications. It has an automatic interface that helps you use its features and functionality to the whole. Juumla tool is an automated tool developed in the Python language which is used to identify the Joomla CMS Version running on the t
2 min read
WPCracker - WordPress User Enumeration and Version Detection Tool
Vulnerability in CMS can be triggered due to an outdated version of CMS or by getting the username information that is related to CMS. This can help to perform a Social Engineering attack. WPCracker is an automated tool developed in the Python Language used to recognize the Version of the WordPress CMS sites. Along with this WPCracker tool supports
2 min read
How to Find out the version of the Raspberry Pi?
Raspberry Pi has significantly advanced computing by making computers available to underprivileged groups of people throughout the world. Due to the widespread use of Raspberry Pis in robotics and other relevant applications, this role is not limited. Check your invoice or the buyer's email confirming your order to find out which Raspberry Pi model
2 min read
How to Update Minikube Latest Version?
In the ever-changing landscape of container orchestration, Minikube stands as a visual signal, simplifying the deployment and management of Kubernetes clusters on your local machine While Minikube continues to evolve with new features and enhancements variety, it’s not best practice to just stay up-to-date This is your ticket to unlocking the full
3 min read
How to Change File Status Color for Version Control in Pycharm IDE?
When working with version control in Pycharm IDE, keeping track of file changes is crucial for efficient development. One way to enhance your workflow is by customizing the file status color in Pycharm. By learning how to change file status color for version control in Pycharm IDE, you can easily distinguish between modified, added, or deleted file
3 min read
Difference Between Arch Linux and Kali Linux
Arch Linux is an open-source Linux-based Operating System that is freely available for use. It belongs to the Pacman-based Linux family. It is a light weighted OS for daily use and could even be used by professionals. It was first released in March 2002. It is a beginner-friendly Linux Operating System. Features of Arch Linux: Minimalist approach:
4 min read
Neofetch In Linux – Snap cool screenshots of your Linux
Neofetch is a fancy, highly customizable, and aesthetic command-line system information screenshot utility tool. Written in the Bash scripting language, it works inside a terminal window, on triggering up the command it by default displays the operating system, software, and hardware of your system on the right side of the column alongside an ASCII
4 min read
Exodus - Copy Linux Binaries From One Linux System
Exodus is an easy-to-implement program, that is used for bundling dependencies, and also helps to effectively copy Linux ELF binaries from one to another machine securely, and this is very handy when you don't have root access, also if there are issues in the availability of the packages in the Linux distribution, Commonly Server oriented distribut
3 min read
Basic CentOS Linux Commands in linux
CentOS is a free and open-source operating system that aims to provide a stable reliable, and community-supported platform for servers and other enterprise applications. In this article, we will be covering CentOS Linux basics commands and functions of CentOS and also we will look into the advanced commands. These CentOS commands allow you to manag
3 min read
Linux on Azure – Linux Distributions
Azure, the cloud computing platform from Microsoft, offers a playground for deploying and managing your Linux-based operating systems. Think of it as a canvas of boundless resources, security, and scalability, painted onto which you can unleash the boundless creativity and flexibility of Linux. This powerful synergy unlocks a world of opportunity,
10 min read
GSmartControl - Tool to Check SSD/HDD Health on Linux
Gsmart control (Self-Monitoring, Analysis, and Reporting Technology)is a GUI tool that clearly shows if there is a problem with your hard drive/SSDs or not, It generally checks and displays the present condition of your hard drive/SSDs and also run the various test on it. Installation (for Debian GNU/Linux): sudo apt-get install gsmartcontrol If yo
2 min read
How to Check and Patch Meltdown CPU Vulnerability in Linux?
Here we will check and Patch Meltdown CPU Vulnerability in Linux. CPU hardware implementations are found vulnerable to side-channel attacks, They are known as: MeltdownSpectre Meltdown: It is a security vulnerability found in hardware that is affecting Intel x86 microprocessors, IBM POWER processors, and some ARM-based microprocessors too. Security
3 min read
Different Ways to Check Which Shell You are Using on Linux
A shell is a program through which users can interact with the Operating System. Linux provides commonly 4 types of Shell The Bourne Shell ( /bin/sh or /sbin/sh ), The C shell ( /bin/csh ), The Korn Shell ( /bin/ksh ), The GNU Bourne-Again Shell ( /bin/bash ). This article is about to Check that which shell we are using. Here, we discuss five ways
2 min read
7 Ways to Check CPU Clock Speed in Linux
In general, a higher clock speed means a faster CPU. However, many other factors come into play. Your CPU processes many instructions (low-level calculations like arithmetic) from different programs every second. The clock speed measures the number of cycles your CPU executes per second, measured in GHz (gigahertz). A “cycle” is technically a pulse
2 min read
How to Check Timezone in Linux
There are a number of time management utilities available on Linux such as timedatectl, date, etc by which you can view the current timezone in your Linux system. In this article, we will be discussing some ways by which you can check the system timezone in Linux. Method 1: Using the command "timedatectl" We can use the timedatectl command to displ
2 min read
How to Check Which Apache Modules are Enabled or Loaded in Linux ?
Apache is designed on the modularity principle, which allows web server operators to install new modules to extend their basic tasks while also improving Apache's performance. The Apache HyperText Switch Protocol (HTTP) server has a front end called apcahe2ctl. Its purpose is to assist an administrator with controlling the Apache HTTP daemon's oper
1 min read
Shcheck – Tool to Check Security Headers in Kali Linux
We know that modern browsers such as chrome and others support many HTTP headers that can improve web application security to protect against clickjacking, cross-site scripting, and other common attacks. Shcheck is a free and open-source tool available on GitHub. Shcheck is used to check whether a security feature in a web application is implemente
2 min read
Sub404 - Tool To Check Subdomain Takeover Vulnerability in Linux
The rights and permission to manage the subdomains are in the website owner's hands, but what if we access the subdomains without rights. Yes, we can do that, known as Subdomain Takeover. Subdomain Takeover is the vulnerability to gain control over a specific subdomain by an unidentified or unauthorized person. The attacker successfully takes acces
4 min read
Sub404 - Tool To Check Subdomain Takeover Vulnerability in Linux
The rights and permission to manage the subdomains are in the website owner's hands, but what if we collect the subdomains without rights Yes, we can do that, known as Subdomain Takeover. Subdomain Takeover is the vulnerability of gain control over a specific subdomain by an unidentified or unauthorized person. The attacker successfully takes the s
4 min read
Sub404 - Tool To Check Subdomain Takeover Vulnerability in Linux
The rights and permission to manage the subdomains are in the website owner's hands, but what if we collect the subdomains without rights Yes, we can do that, known as Subdomain Takeover. Subdomain Takeover is the vulnerability of gain control over a specific subdomain by an unidentified or unauthorized person. The attacker successfully takes the s
4 min read
How to check how many CPUs are there in Linux system
In this article, we will discuss how to check CPU information in a Linux system. In the Linux system, the main configuration file of the CPU and system architecture is stored at /proc/cpuinfo. With the help of the cat, nano command we can view the CPU configuration file. This helps a lot in getting process management and manufacturing names. How to
2 min read
Article Tags :