Red Hat is a popular and influential fork of the Linux operating system. It has been around since the mid-1990s and has earned a reputation for being stable, reliable, and regularly updated. There are many Linux operating systems based on Red Hat architecture, such as RHEL, CentOS and Fedora.
Finding your Red Hat version is straightforward. This tutorial shows you five ways to check the version of Red Hat Enterprise Linux (RHEL).
- A system running RHEL, CentOS, or another Red-Hat-based Linux distribution
- A terminal window/command line (Ctrl-Alt-F2)
5 Ways to Find Version of Red Hat Linux (RHEL)
Option 1: Use hostnamectl
The hostnamectl command is usually used to track the way your system appears on a network. However, it also includes information such as the OS and version, making it a quick and handy way to check these specifics.
Open a terminal window and enter the following:
The fields you are interested in are:
- Operating System: This tells you which Linux fork you are using, and which major release.
- Kernel: This is the version of the Linux kernel your operating system is using.
- Architecture: This tells you whether you are running a 32-bit or 64-bit operating system, which is essential when choosing a software package to install.
Option 2: Find Version in /etc/redhat-release File
Red Hat-based distros contain release files located in the /etc/redhat-release directory.
For example, os-release, system-release, and redhat-release.
To check each file for your Red Hat OS version use the command:
In the image above, you can see that this system is using the version CentOS 7.6.1810.
Option 3: Check Query Release Package with RPM
Alternatively, you can use the rpm command to query Red Hat’s release package.
Enter the following command:
OR
Specifically, use the command that is appropriate for your version of Linux (RHEL or CentOS distribution).
Expect more details than when using hostnamectl .
Option 4: Finding Red Hat Version and Release Using /etc/issue File
You can check the Red Hat version within the /etc/issue file.
Use the command:
Option 5: Check Common Platform Enumeration File
Check the CPE file for your Red Hat version by entering:
The system should return a full name and version of your operating system.
Check Other Release Files
Your Linux operating system keeps a set of release files in the /etc/ directory.
List the file names of release versions by typing the following command:
Each of the entries listed holds information about your Red Hat version.
Use the cat (concatenate) command to list the contents of the files:
You can substitute the names of the files displayed on your system for the redhat-release file in the example above.
Discussion on Red Hat Versions
At the moment, RHEL (Red Hat Enterprise Linux), and CentOS are two of the most popular versions of Red Hat Linux.
The Red Hat version is different from the Linux Kernel version. The Linux Kernel is like the central brain of the Linux operating system and can be updated independently of the operating system. The Operating System version is the release version number of the whole OS package.
You may see a Red Hat version number like Red Hat 7.3. The number 7 refers to a major release, much like “Windows 7” and “Windows 10.” The number following the dot refers to the level of patches and minor updates. So Red Hat 7.3 is Red Hat version 7, patched and updated to 7.3.
After reading this article, you will know how to check or find your Red Hat operating system version in a number of ways.
Finally, for more information about the Red Hat family of Linux, please see the official Red Hat documentation.
When you install a Linux distribution on your own, you know which distribution and version it is.
But if you use SSH to log in to a remote Linux server provided by an enterprise or client, you may wonder which Linux distribution and version it is.
The simplest way to check Linux version is to see the content of the /etc/os-release file:
It will show an output similar to this:
As you can see, the Linux name is Ubuntu and the version is 20.04.1.
However, that’s not the only way to know the Linux distribution details. In this beginner’s tip, I’ll show you different ways to check which Linux you are running.
Find Linux distribution details
Method 1: Use /etc/os-release file
If you are familiar with the Linux directory structure, you probably already know that /etc directory contains the core configuration files of the system.
The os-release file in the /etc directory keeps the information about the Linux distribution. It gives you the distribution name, distribution version, release name or ID.
Here’s what it displays for Alpine Linux server running on Linode infrastructure.
As you can see, the name of Linux distribution is Alpine Linux and the distribution version is 3.12.
The content of the /etc/os-release is usually different for different distributions. Distributions often use it to provide additional information like where to get support or file bugs etc.
For example, the /etc/os-release provides more lines for CentOS Linux.
However, all of them provide the Linux distribution name and version so it is a pretty reliable way to know which Linux you are running. In fact, it is the most reliable way.
Linode
Method 2: Use hostnamectl command
Most Linux distributions these days use systemd. On such a system, you can use the hostnamectl command to get Linux version detail.
For the same CentOS system that you saw above, hostnamectl provides the following details:
You can see the Linux version detail in the line starting with ‘Operating System’.
The hostnamectl command is primarily used for dealing with the hostname but if it provides other details why not use it?
Method 3: Use lsb-release command
This is NOT a command that you’ll find in all Linux distributions. I think it is mostly used by Debian/Ubuntu based distributions.
You can use the lsb_release command with option -a and it will provide distribution details:
Don’t mind the No LSB modules are available line. It’s not an error of any kind.
Bonus Tip: Find Linux kernel version
Now that you know which distribution you are running, perhaps you would also like to know about the Linux kernel version running on the system.
You can get the kernel details using the uname command in any Linux distribution.
The output shows only the Linux kernel version:
No prizes for guessing that the above system is running on Linux kernel version 5.4.43.
I hope you find this quick tip helpful in finding Linux version detail. If you have questions or suggestions, please let me know in the comment section.
There are several ways of knowing the version of Linux you are running on your machine as well as your distribution name and kernel version plus some extra information that you may probably want to have in mind or at your fingertips.
Therefore, in this simple yet important guide for new Linux users, I will show you how to do just that. Doing this may seem to be relatively easy task, however, having a good knowledge of your system is always a recommended practice for a good number of reasons including installing and running the appropriate packages for your Linux version, for easy reporting of bugs coupled with many more.
With that said, let us proceed to how you can figure out information about your Linux distribution.
Find Out Linux Kernel Version
We will use uname command, which is used to print your Linux system information such as kernel version and release name, network hostname, machine hardware name, processor architecture, hardware platform and the operating system.
To find out which version of Linux kernel you are running, type:
In the preceding command, the option -o prints operating system name and -r prints the kernel release version.
You can also use -a option with uname command to print all system information as shown:
Next, we will use /proc file system, that stores information about processes and other system information, it’s mapped to /proc and mounted at boot time.
Simply type the command below to display some of your system information including the Linux kernel version:
From the image above, you have the following information:
- Version of the Linux (kernel) you are running: Linux version 4.5.5-300.fc24.x86_64
- Name of the user who compiled your kernel: [email protected]
- Version of the GCC compiler used for building the kernel: gcc version 6.1.1 20160510
- Type of the kernel: #1 SMP (Symmetric MultiProcessing kernel) it supports systems with multiple CPUs or multiple CPU cores.
- Date and time when the kernel was built: Thu May 19 13:05:32 UTC 2016
Find Out Linux Distribution Name and Release Version
The best way to determine a Linux distribution name and release version information is using cat /etc/os-release command, which works on almost all Linux system.
In this article, we walked through a brief and simple guide intended to help new Linux user find out the Linux version they are running and also get to know their Linux distribution name and version from the shell prompt.
Perhaps it can also be useful to advanced users on one or two occasions. Lastly, to reach us for any assistance or suggestions you wish to offer, make use of the feedback form below.
If You Appreciate What We Do Here On TecMint, You Should Consider:
TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.
If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.
We are thankful for your never ending support.
Related Posts
15 thoughts on “How to Find Out What Version of Linux You Are Running”
A command line is something that interacts directly with the inner systems of a computer. (terminal, command line, etc)
This is very helpful.
What about multiboot systems, is there command for listing all installed linux os by partition? i.e. I have installed 3 different linux systems each on their different partition segments.
How can I find out which partition has which linux OS and version? I know when I install a new linux system the guided process let me view the existing installed OS version by partition table, can i view the same info by running a command?
You can only tell the filesystem type (EXT2, EXT3, EXT4, BTRFS etc..) on a partition, not the Linux OS/distribution installed.
“To find out which version of Linux kernel you are running, type:”
TYPE IT WHERE? You do not give the ESSENTIAL INFORMATION. Command Line? WHERE IS THAT?
Quick quiz: How do you know which version of Linux you are using? Which kernel? Which distribution? Which release of your distribution?
Believe it or not, there are situations where this information could be of great importance. Say, for example, a new threat has been released (such as a rather serious OpenSSL-related security issue) which only affects specific releases. If the flaw only affects specific distributions, distribution releases, kernels, or packages you need to be able to quickly gather information about the distro you’re running, and act.
Outside of that very crucial example, there are other reasons why you will want to know about Linux releases—even release types—in order to better navigate the world of Linux and all the power that comes with the platform.
Before we get into how to discern the various bits of information on your desktops and servers, I want to discuss the two major types of Linux releases.
Rolling versus fixed release
There are, effectively, two types of releases in the world of Linux:
The two different releases are quite different, so it is important to understand how they work. The easiest way to know the difference between a Rolling and Fixed released distribution is this:
A Rolling release is constantly being updated and works with one code branch.
There are two ways of dealing with this constant state of updating. The first, and most popular, is to release a steady stream of very small updates. With this release model, the distribution is in a perpetual state of having the most up-to-date software. The second method (one which Ubuntu Core is adopting) is to replace the full image of the operating system with a new one as it is made available. Clearly, the latter option is only viable for cloud deployments (as replacing a full image is really just a distribution upgrade or reinstallation).
The Fixed release is fairly standard. You install a release and, as long as said release is supported, security and patch updates to packages will be available to you as they are seeded to the distribution repositories. You may not see updates daily (or even weekly), but they will eventually appear as available to your desktop or server. The upside of the Fixed release is stability. For many, the major downfall of the Fixed release is the need to completely reinstall (or trust that a major upgrade will not have issues on a production machine) based on a distribution’s release schedule (such as Ubuntu’s six-month schedule).
Each release type has its pros and cons. For example, the Rolling release offers you a platform that almost always has the most up-to-date version of the software you use, but due to that bleeding edge nature, may suffer instability at times. The Fixed release most often will include software that is less than bleeding edge, but it may often enjoy a bit more stability.
For a full list of Rolling release Linux distributions, check out this Wiki page.
With that information out of the way, how do you “uncover” the necessary information about your particular Linux distribution? There are a few tools at your fingertips. Let’s use them.
It is also important to make mention of a particular release structure given to Ubuntu and its supported flavors (Kubuntu, Xubuntu, Ubuntu GNOME, etc). Every two major releases (i.e. 12.04, 14.04, 16.04, etc.) an Ubuntu release is considered Long Term Support. This means support for the release will extend for five years (on both desktops and servers). On standard, non-LTS releases, support is only valid for six months. An LTS release is Enterprise-focused, compatible with new hardware, and more thoroughly tested than non-LTS releases. With that said, if you want a more cutting-edge Ubuntu distribution, go with the non-LTS release. If you want stability and support, install only the LTS releases.
Finding your kernel release
There will be times when you must know your kernel release number. Fortunately, the developers saw fit to include a handy tool that will quickly display your kernel release number. Here’s what you need to do:
Open up a terminal window
Issue the command
Take note of the information displayed (Figure 1).
Finding your distribution release
There may be times when you need to know the release number you currently use. Again, there’s a handy command to find that information. Do the following:
Open a terminal window
Issue the command
Take note of the information displayed (Figure 2).
If your command fu isn’t what it should be, most distributions display their release numbers in Settings > Details > Overview (Figure 3).
This method of discerning your distribution release information has the added bonus of handing you some details about your system hardware (memory, CPU, graphics, OS type, and disk size).
Finding a specific package release number
Let’s dig a bit deeper. Say you’ve read that OpenSSL has a security flaw that affects only specific releases. How do you find out which version of OpenSSL is on your system? This will depend upon your distribution.
For a Debian-based distribution (such as Ubuntu), you would issue the command:
Which would report all the information you needed for the package installed on your system. (Figure 4).
If you’re using an rpm-based distribution (such as Fedora), the command to locate information about OpenSSL would be:
The above command will return information on all installed openssl packages.
You now have the knowledge and tools to find your release information. You may never need to know any of this data … but on the occasion that you do, you’ll be glad it’s at your fingertips. It is of the utmost importance that, when you hear of critical issues surrounding packages like OpenSSL, SSH, PHP, etc. you check the versions installed on your machine against the affected packages and take action. Luckily, you now have the ability to do just that.
Get these quick commands to figure out what Linux kernel version and distribution your system is running.
Subscribe now
Get the highlights in your inbox every week.
The question “what version of Linux” can mean two different things. Strictly speaking, Linux is the kernel, so the question can refer specifically to the kernel’s version number, or “Linux” can be used more colloquially to refer to the entire distribution, as in Fedora Linux or Ubuntu Linux.
The following will help you find out what version of the Linux kernel and/or what Linux distribution is running on a system.
How to find the Linux kernel version
To find out what version of the Linux kernel is running, run the following command:
Alternatively, the command can be run by using the longer, more descriptive, versions of the various flags:
Either way, the output should look similar to the following:
This gives you (in order): the kernel name, the version of the kernel, and the type of hardware the kernel is running on. In this case, the kernel is Linux version 4.16.10-300.fc28.x86_64 running on an x86_64 system.
More information about the uname command can be found by running man uname .
How to find the Linux distribution
There are several ways to figure out what distribution is running on a system, but the quickest way is the check the contents of the /etc/os-release file. This file provides information about a distribution including, but not limited to, the name of the distribution and its version number. The os-release file in some distributions contains more details than in others, but any distribution that includes an os-release file should provide a distribution’s name and version.
To view the contents of the os-release file, run the following command:
On Fedora 28, the output looks like this:
As the example above shows, Fedora’s os-release file provides the name of the distribution and the version, but it also identifies the installed variant (the “Workstation Edition”). If we ran the same command on Fedora 28 Server Edition, the contents of the os-release file would reflect that on the VARIANT and VARIANT_ID lines.
Sometimes it is useful to know if a distribution is like another, so the os-release file can contain an ID_LIKE line that identifies distributions the running distribution is based on or is similar to. For example, Red Hat Enterprise Linux’s os-release file includes an ID_LIKE line stating that RHEL is like Fedora, and CentOS’s os-release file states that CentOS is like RHEL and Fedora. The ID_LIKE line is very helpful if you are working with a distribution that is based on another distribution and need to find instructions to solve a problem.
CentOS’s os-release file makes it clear that it is like RHEL, so documentation and questions and answers in various forums about RHEL should (in most cases) apply to CentOS. CentOS is designed to be a near clone of RHEL, so it is more compatible with its LIKE than some entries that might be found in the ID_LIKE field, but checking for answers about a “like” distribution is always a good idea if you cannot find the information you are seeking for the running distribution.
More information about the os-release file can be found by running man os-release .
Screenfetch and neofetch
The uname and /etc/os-release commands are the most common methods for getting the version of Linux you’re running and are available by default on any Linux system you run. There are, however, additional tools that can provide you a report about your system.
The screenfetch and neofetch commands give a verbose overview of your system, with details about your kernel, architecture, available RAM, CPU speed and core count, desktop version, and so on.
Hostnamectl
The hostnamectl command is available on most modern Linux distributions. If it’s not already installed, you can install it from your software repository. Despite its humble name, it provides far more than just your hostname;
Desktop utilities
Some desktop environments offer similar system reporting tools. For instance, the KDE Plasma desktop provides KInfoCenter, which can tell you everything from your kernel and architecture to your available network interface cards, IP address, and much more.
kinfo-main.jpg
Know your OS
Regardless of what tool you decide to make your default, getting the version and features of your OS is a seemingly simple but important skill. Remember these tips so the next time you need to see what you’re running, you’ll know several places you can find out.
This article originally published in 2018 and has been updated by the editor with additional information.
To find the version of Linux Mint that you are running, you can make use of any of the four methods discussed below:
Method # 1: Using the /etc/issue File
To find the version of Linux Mint using the /etc/issue file, perform the following steps:
Launch the terminal in Linux Mint by clicking on the terminal icon located on your taskbar. Alternatively, you can use the Ctrl + Alt + T shortcut combination to do so. The newly launched terminal window is shown in the image below:
Type the following command in your terminal and then press the Enter key:
This command is also shown in the following image:
Running this command will show you the version of Linux Mint that is currently running, as shown in the image below:
Method # 2: Using the lsb_release Utility
To find the version of Linux Mint using the lsb_release utility, perform the following steps:
Launch the terminal in Linux Mint by clicking on the terminal icon located on your taskbar. Alternatively, you can use the Ctrl + Alt + T shortcut combination to do so. The newly launched terminal window is shown in the image below:
Type the following command in your terminal, and then press the Enter key:
This command is also shown in the following image:
Running this command will show you all the details about the release version of your Linux Mint operating system, as highlighted in the image below:
Method # 3: Using the hostenamectl Command
To find the version of Linux Mint using the hostnamectl command, perform the following steps:
Launch the terminal in Linux Mint by clicking on the terminal icon located on your taskbar. Alternatively, you can use the Ctrl + Alt + T shortcut combination to do so. The newly launched terminal window is shown in the image below:
Type the following command in your terminal and then press the Enter key:
This command is also shown in the following image:
Running this command will show you the version of your Linux Mint, along with some other details as highlighted in the image shown below:
Method # 4: Using the GUI
To find the version of Linux Mint using the GUI, perform the following steps:
Click on the Menu icon located at the bottom-left corner of your Linux Mint taskbar. Next, type ‘system info’ in the search bar that appears, and then click the ‘System Info’ search result, as highlighted in the image shown below:
Doing this will display all system-related information on your screen, along with the version of your Linux Mint operating system, as highlighted in the following image:
Conclusion
By using any of the four methods discussed in this article, you can easily find the version of Linux Mint that you are running. All of these methods are really simple and convenient to use, requiring only a few seconds to provide you the desired results.
About the author
Karim Buzdar
Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications. As an IT engineer and technical author, he writes for various web sites. He blogs at LinuxWays.
In this article, we will explain how to find out which version of openSUSE Linux distribution installed and running on a computer. The /etc/os-release and /usr/lib/os-release files include all openSUSE version information and you can view openSUSE Version information in these two files using your favorite text editor from the graphical user interface (GUI) or from the command line interface (CLI) as shown below.
From the GUI, simply open the /etc/os-release and /usr/lib/os-release files using your favorite text editor. For example using Kate text editor, which contain operating system identification data.
Alternatively, open the terminal and use the cat utility to view contents of /etc/os-release and /usr/lib/os-release as shown.
Some of the important fields in the file are explained below:
- NAME: A human-friendly name of the distribution, without the version number. example “openSUSE Leap“.
- PRETTY_NAME: A human-friendly name of the distribution, with a version number. example “openSUSE Leap 15.0“.
- VERSION: A human-friendly version of the distribution. example “15.0“.
- ID: A computer-friendly name of the distribution, without the version number. example “opensuse-leap“. This field should be safe for parsing in scripts.
- ID_LIKE: A space divided list of IDs for equivalent operating systems with common behavior to ID=. example “opensuse suse“. Note that the entry of “suse” means all openSUSE, SUSE, SUSE Linux Enterprise distributions and derivatives such as “opensuse” represents only openSUSE distributions and derivatives.
- VERSION_ID: A computer-friendly version of the distribution. example “15.0” or “20180530“.
Another Alternative way is to use the lsb_release command to find the version of your currently running OpenSuSE Linux as shown.
Note: Your system must have lsb-release package installed, if not, install it using zypper command as shown.
That’s all! In this short article, we have described instructions on how to find which version of openSUSE you are running via the Graphical and Command-line way. If you have any questions or thoughts to share concerning this topic, reach us via the comment form below.
If You Appreciate What We Do Here On TecMint, You Should Consider:
TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.
If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.
The free Ubuntu operating system serves as a good alternative to Windows and macOS. The open-source system is highly flexible and comes with a variety of pre-installed software. Programmers can further develop its programs or use it for implementing their own software projects. But of course there will be times when you want to install additional programs. So how do you find out if your preferred software is compatible with your Ubuntu operating system? The Ubuntu version you’re using will be crucial information.
You’ll also need to know which Ubuntu version you’re running when troubleshooting. If you include the version number in your searches on forums and blogs, you’ll get a more specific answer to your questions. Keep reading to find out how to check your Ubuntu version.
Register great TLDs for less than $1 for the first year.
Why wait? Grab your favorite domain name today!
Matching email
SSL certificate
24/7/365 support
Checking the Ubuntu version in the terminal
There are two ways to check your Ubuntu version in the terminal. Both of them use a simple command entered into the command line.
Option 1: Command lsb_release -a
- Open the terminal using “Show Applications” or use the keyboard shortcut [Ctrl] + [Alt] + [T].
- Type the command “lsb_release -a” into the command line and press enter.
- The terminal shows the Ubuntu version you’re running under “Description” and “Release”.
The command lsb_release -a shows you the Ubuntu version you’re using.
Option 2: Read the contents of /etc/lsb-release
- Open the terminal using “Show Applications” or with the keyboard shortcut [Ctrl] + [Alt] + [T].
- Type the command “cat /etc/lsb-release” into the command line and press enter.
- The terminal shows the Ubuntu version you’re running under “DISTRIB_RELEASE” and “DISTRIB_DESCRIPTION”.
You can use the terminal to read the contents of the file cat /etc/lsb-release and view your Ubuntu version.
Checking the Ubuntu version in Settings
Another way to check your Ubuntu version is in the Settings. This can be done in just three clicks.
Even if you leave your WSL Linux session, it remains active. This allows you to quickly return where you left off (requires a terminal multiplexer like screen or tmux), or run a daemon/server. Here’s how to find WSL Linux distros you have running in the background.
The ability to run Linux natively in Windows 10 is provided by the WSL feature. WSL stands for Windows Subsystem for Linux, which initially, was limited to Ubuntu only. Modern versions of WSL allow installing and running multiple Linux distros from Microsoft Store.
After enabling WSL, you can install various Linux versions from the Store. You can use the following links:
- Ubuntu
- openSUSE Leap
- SUSE Linux Enterprise Server
- Kali Linux for WSL
- Debian GNU/Linux
Find Running WSL Linux Distros
Starting with Windows 10 build 17046, Windows Subsytem for Linux (WSL) has got support for long-running background tasks, similar to how the Windows subsystem has Services. This is a really impressive change for users of WSL who work with servers like Apache or apps like screen or tmux. Now they can run in the background like regular Linux daemons. This, and a number of others, are reasons to have an active WSL instance in Windows 10.
Even when you issue the exit command, this doesn’t turn off your WSL distro. Starting in Windows 10 build 18836 (Skip Ahead) and build 18342 (Fast Ring) you can quickly find running distros using new features of the OS. Here is how it can be done.
To Find Running WSL Linux Distros in Windows 10,
- Open File Explorer
- Click on the Linux item in the Navigation Pane.
- Click on Distros shortcut in the Linux folder to see all currently running WSL distros.
Alternatively, you can use a console tool, wsl.exe, to see which WSL Linux distros are currently running on your computer.
Find Running WSL Linux Distros with wsl.exe
Articles of interest:
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:
Share this post
About Sergey Tkachenko
Sergey Tkachenko is a software developer from Russia who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube.