Linux how to find linux version

Linux how to find linux version

Find The Linux Distribution Name, Version And Kernel Details

This guide explains how to find the Linux distribution name, version and Kernel details from commandine. If your Linux system has GUI mode, you can find these details easily from the System’s Settings. But in CLI mode, it is bit difficult for beginners to find out such details. No problem! Here I have given a few command line methods to find the Linux system information. There could be many, but these methods will work on most Linux distributions.

1. Find Linux distribution name, version

There are many methods to find out what OS is running on in your VPS.

Method 1:

Open your Terminal and run the following command:

Sample output from Alpine Linux:

Sample output from Arch Linux:

Sample output from Fedora 33:

Sample output from CentOS 7:

Sample output from Ubuntu 20.04:

Sample output from Ubuntu 18.04:

On Alpine Linux, run:

Sample output:

Method 2:

The following command will also get your distribution details.

Sample output from Arch Linux:

Sample output from Ubuntu 20.04 LTS:

On Ubuntu 18.04:

Method 3:

The following command will get you the distribution details in Debian and its variants like Ubuntu, Linux Mint etc.

Ubuntu 20.04:

Ubuntu 18.04:

2. Find Linux Kernel details

Method 1:

To find out your Linux kernel details, run the following command from your Terminal.

Sample output from Arch Linux:

Sample output in CentOS 7:

Sample output from Fedora 33:

Sample output in Ubuntu 20.04:

Ubuntu 18.04:

Sample output:

For more details about uname command, refer the man page.

Method 2:

From your Terminal, run the following command:

Sample output from Arch Linux:

Sample output from CentOS 7:

Sample output from Fedora 33:

Sample output from Ubuntu 20.04:

Ubuntu 18.04:

These are a few ways to find find out a Linux distribution’s name, version and Kernel details. Hope you find it useful.

What version of Linux am I running?

Linux how to find linux version. Смотреть фото Linux how to find linux version. Смотреть картинку Linux how to find linux version. Картинка про Linux how to find linux version. Фото Linux how to find linux version

Internet Archive Book Images. Modified by Opensource.com. CC BY-SA 4.0

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.

More Linux resources

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.

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.

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.

Linux how to find linux version. Смотреть фото Linux how to find linux version. Смотреть картинку Linux how to find linux version. Картинка про Linux how to find linux version. Фото Linux how to find linux version

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.

Linux how to find linux version. Смотреть фото Linux how to find linux version. Смотреть картинку Linux how to find linux version. Картинка про Linux how to find linux version. Фото Linux how to find linux version

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.

How to Find Your Linux Version or Distro Release, and Why It Matters

Linux how to find linux version. Смотреть фото Linux how to find linux version. Смотреть картинку Linux how to find linux version. Картинка про Linux how to find linux version. Фото Linux how to find linux version

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).

Linux how to find linux version. Смотреть фото Linux how to find linux version. Смотреть картинку Linux how to find linux version. Картинка про Linux how to find linux version. Фото Linux how to find linux version

If your command fu isn’t what it should be, most distributions display their release numbers in Settings > Details > Overview (Figure 3).

Linux how to find linux version. Смотреть фото Linux how to find linux version. Смотреть картинку Linux how to find linux version. Картинка про Linux how to find linux version. Фото Linux how to find linux version

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).

Linux how to find linux version. Смотреть фото Linux how to find linux version. Смотреть картинку Linux how to find linux version. Картинка про Linux how to find linux version. Фото Linux how to find linux version

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.

Linux how to find linux version. Смотреть фото Linux how to find linux version. Смотреть картинку Linux how to find linux version. Картинка про Linux how to find linux version. Фото Linux how to find linux version

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.

How to find Linux distribution name and Version?

In this article, we will learn how to check the installed Linux distribution name and Version on Linux Mint 20.

So, let’s start the demo.

Pre-requisites

You must have ‘sudo’ privileges or log in from the root user account on your system.

Check name and Version on Linux Mint 20

You can check the name and installed Linux distribution version using the following two different ways:

Let’s discuss each method one by one in detail.

Method 1: Check name and Version in Linux Mint 20 through the command line

Some users prefer to use the command line instead of the graphical user interface in Linux systems. Hence, using the command line, you have more options to get details about the installed Linux Mint distribution. To check the name and version of the Linux system on Linux Mint 20 environment, you need to follow the following different steps:

To open the terminal application, just log in to your Linux Mint 20 system and then click on the terminal icon that will be displayed on the taskbar.

Linux how to find linux version. Смотреть фото Linux how to find linux version. Смотреть картинку Linux how to find linux version. Картинка про Linux how to find linux version. Фото Linux how to find linux version

Or you can pick the terminal by accessing the main menu. You can see the below-given screenshot, which is highlighted red:

Linux how to find linux version. Смотреть фото Linux how to find linux version. Смотреть картинку Linux how to find linux version. Картинка про Linux how to find linux version. Фото Linux how to find linux version

In Linux distribution, specifically for Linux Mint 20, there are a lot of various utilities and text files present, which may help you to find the Linux Mint version. You can search the file that contains more information about the installed Linux Mint version, and that is available for all Debian based Linux/GNU distributions. This file you can find at etc/issue. Run the below-mentioned command on the terminal that will display the installed Linux Mint version:

After executing the above command, the following output will show on the terminal:

Linux how to find linux version. Смотреть фото Linux how to find linux version. Смотреть картинку Linux how to find linux version. Картинка про Linux how to find linux version. Фото Linux how to find linux version

Display installed Version Using hostnamectl utility:

The most common utility or command that is available for almost all Linux systems is ‘hostnamectl.’ It displays detailed information about the currently running operating system. To display the installed version of Linux distribution using ‘hostnamectl’ utility, follow the appended method:

Type the following command on the terminal to display the information about the installed Linux Mint version:

The above command will display the complete information about the currently used operating environment and loaded kernel version. The following details about the installed Linux system to be displayed on the terminal:

Linux how to find linux version. Смотреть фото Linux how to find linux version. Смотреть картинку Linux how to find linux version. Картинка про Linux how to find linux version. Фото Linux how to find linux version

The one, more file option ‘/etc/linuxmint/info,’ is available on the Linux Mint 20 distribution that keeps the details about the kernel and installed Version. Execute the following command on the terminal to view the kernel details:

The following output should display on the terminal window:

Linux how to find linux version. Смотреть фото Linux how to find linux version. Смотреть картинку Linux how to find linux version. Картинка про Linux how to find linux version. Фото Linux how to find linux version

One more popular command which is available on Linux Mint is the ‘lsb_release’ command that provides much flexibility to select which piece of information is important for you to include in the Version checking task. To reveal the information about the released Version, distributor details, and codename, then you need to execute the following command:

After executing the above command, you will achieve the following information on the terminal window:

Linux how to find linux version. Смотреть фото Linux how to find linux version. Смотреть картинку Linux how to find linux version. Картинка про Linux how to find linux version. Фото Linux how to find linux version

Type the following command to view the information about Linux Mint:

The following installed distribution details will display on the terminal screen:

Linux how to find linux version. Смотреть фото Linux how to find linux version. Смотреть картинку Linux how to find linux version. Картинка про Linux how to find linux version. Фото Linux how to find linux version

Or you can also execute the following command to check the installed version of Linux Mint on your system:

You will see the following detailed information about the Linux Mint version:

Linux how to find linux version. Смотреть фото Linux how to find linux version. Смотреть картинку Linux how to find linux version. Картинка про Linux how to find linux version. Фото Linux how to find linux version

Method 2: Check version using the graphical user interface method in Linux Mint 20

As we have discussed above, various Desktop environment managers are available for all Linux Mint distributions. So, you need to follow the following steps to check the installed Linux Mint version for Cinnamon Desktop.

Linux how to find linux version. Смотреть фото Linux how to find linux version. Смотреть картинку Linux how to find linux version. Картинка про Linux how to find linux version. Фото Linux how to find linux version

Linux how to find linux version. Смотреть фото Linux how to find linux version. Смотреть картинку Linux how to find linux version. Картинка про Linux how to find linux version. Фото Linux how to find linux version

The following window will display on your system:

Linux how to find linux version. Смотреть фото Linux how to find linux version. Смотреть картинку Linux how to find linux version. Картинка про Linux how to find linux version. Фото Linux how to find linux version

From the above screenshot, you can get the details about the currently installed operating system, cinnamon version, Linux kernel, and other system resources like processor, memory, hard drive, and graphics card.

Conclusion

From the above article, we have learned how to check the details about the name and installed Version of Linux Mint. You can get detailed information about your system by following this tutorial. From all the information, as mentioned above, I hope now you can find the installed Version of any Linux distribution. We have discussed two different ways, i.e., by using a command line and by using a graphical user interface, through which a user can display the information about the installed Linux distribution. If you feel any difficulty related to the ways as mentioned above, then let us know via your feedback through the comments. We will welcome your queries.

About the author

Linux how to find linux version. Смотреть фото Linux how to find linux version. Смотреть картинку Linux how to find linux version. Картинка про Linux how to find linux version. Фото Linux how to find linux version

Aqsa Yasin

I am a self-motivated information technology professional with a passion for writing. I am a technical writer and love to write for all Linux flavors and Windows.

How to know which Linux Distribution I’m using? [closed]

Want to improve this question? Update the question so it’s on-topic for Stack Overflow.

How to know which Linux Distribution I’m using?

I uses /etc/init.d/serviced restart for restarting serevices, seems it is not Redhat family

6 Answers 6

Trending sort

Trending sort is based off of the default sorting method — by highest score — but it boosts votes that have happened recently, helping to surface more up-to-date answers.

It falls back to sorting by highest score if no posts are trending.

Switch to Trending sort

You could also try /etc/*-version

]$ cat /etc/*-release cat: /etc/*-release: No such file or directory [itflux][

]$ cat /etc/*-version cat: /etc/*-version: No such file or directory

If you have lsb_release command,

Edit: Looks like you’re on a Red Hat system. A google search on your uname output suggests so. This is not programmatic, of course!

/etc/issue or /etc/issue.net give a good clue. Newer distros provide /etc/lsb-release which make it easier to determine exact strings progmatically, i.e. distro name / major & minor release / web site, etc.

In the absence of /etc/lsb-release, its much more difficult, hence the creation of lsb-release.

As Alok said, it looks like you are on a rather ancient (or extremely sparse) system. I don’t think this is a case that you can (reliably) progmatically determine with a few lines of code.

Источники информации:

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *