Linux check distribution installed

How to Find Linux Distribution Release Name and Version

There are many commands in Linux to get the same information and one such command is the lsb_release, which is used to get the Linux distribution-related information such as OS name, code name, release information.

In some Linux distributions, the lsb_release command will be available to use and in some distributions, you have to install it, as this command is part of the LSB-core package.

Check Linux Distribution Information

To check if the lsb_release command is installed run the following command.

$ which lsb_release /usr/bin/lsb_release 

In some distributions like Ubuntu, this command is already available to use but you will get the following error when you try to use some flags.

$ lsb_release -v No LSB modules are available. 

Install lsb-core in Linux Distributions

To fix this you need to install the lsb-core package. Depending upon the distribution you are using run the following commands to install the lsb-core package.

------- On Debian/Ubuntu ------- $ sudo apt-get update $ sudo apt-get install lsb-core ------- On Arch/Manjaro ------- $ pacman -Syu lsb-release ------- On RHEL/CentOS ------- $ sudo yum update $ sudo yum install redhat-lsb-core ------- On Fedora ------- $ sudo dnf update $ sudo dnf install redhat-lsb-core ------- On SUSE ------- $ sudo zypper update $ sudo zypper install lsb-core

Get Linux Distribution Information

Once installed, try to run the lsb_release command again.

Check Linux OS Version

To get the list of available options you can refer to the man page or «-h» flag.

$ man lsb_release $ lsb_release -h

lsb_release Help

To check the description, about your distribution use the ‘-d’ flag.

Check Linux OS Description

To check the version information using the ‘-r’ flag.

$ lsb_release -r Release: 20.04 

Every distribution comes with a code name. For example, Ubuntu 20.04 comes with the name “Focal Fossa”. To get the name use the ‘-c’ flag.

$ lsb_release -c Codename: focal 

You can get all the information by using the ‘-a’ flag.

Check Linux OS Information

If you look at the output so far it is in key-value pair. You can just display the value alone by using the ‘-s’ flag.

$ lsb_release -i Distributor ID: Ubuntu $ lsb_release -is Ubuntu 

That’s it for this article. The lsb_release is a simple command to get information about your distribution.

Источник

How to find Linux distribution name and Version?

While you are working on new Linux distribution, you might not know which Linux version is installed on your system. Sometimes, you need to meet a few system requirements while running an application on your system. However, different ways are available to check the Version of installed Linux distribution. Linux Mint 20 is the most growing Linux distribution and has a number of available graphical user interfaces that may vary from one user to the other. Hence, each user may also have a different running procedure. For this purpose, the recommended solution is to access and open the terminal command-line application.

Читайте также:  Astra linux автомонтирование флешки

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

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:

  • Check name and Version in Linux Mint 20 through the command line
  • Check Version using a graphical user interface method in Linux Mint 20

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.

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

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:

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:

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:

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:

Читайте также:  Версия linux для разработчиков

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

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

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

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:

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.

  • Click on the start menu, the following application list menu will display on the system.
  • Click on the ‘system settings’ icon from the list, which is also highlighted in the below-given screenshot.

  • Once you click on the system settings, the following window will display your system where you will see the different management applications. Scroll the mouse cursor on the displayed window and click on the ‘system info’ icon as follows:

The following window will display on your system:

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

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 Check Linux Version

When people refer to Linux, they are usually referring to a Linux distribution. Strictly speaking, Linux is a kernel, the core component of the operating system that, simply put, acts just like a bridge between the software applications and the hardware. A Linux distribution is an operating system made from a Linux kernel, GNU tools and libraries, and software collections. Usually, Linux distributions include desktop environments, package management system, and a set of preinstalled applications.

Some of the most popular Linux distributions are Debian, Red Hat, Ubuntu, Arch Linux, Fedora, CentOS, Kali Linux, OpenSUSE, Linux Mint, etc.

When you log in to a Linux system for the first time, before doing any work, it is always a good idea to check what version of Linux is running on the machine. For example, determining the Linux distribution can help you figure out what package manager you should use to install new packages.

Читайте также:  Alt linux настройка proxy

This article shows how to check what Linux distribution and version is installed on your system using the command line.

lsb_release command #

The lsb_release utility displays LSB (Linux Standard Base) information about the Linux distribution. This command should work on all Linux distributions that have the lsb-release package installed:

No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 9.5 (stretch) Release: 9.5 Codename: stretch 

The Linux distribution and version are shown in the Description line. As you can see from the output above, I have Debian GNU/Linux 9.5 (stretch) installed on my system.

Instead of printing all of the above information, you can display the description line, which shows your Debian version passing the -d switch.

The output should look similar to below:

Description: Debian GNU/Linux 9.5 (stretch) 

If you get “command not found: lsb_release” you can try to identify the Linux version using some of the other methods below.

/etc/os-release file #

The /etc/os-release file contains operating system identification data, including information about the distribution. This file is part of the systemd package and should be present on all system running systemd.

To view the contents of the os-release file, use either cat or less :

The output should look something like below:

PRETTY_NAME="Debian GNU/Linux 9 (stretch)" NAME="Debian GNU/Linux" VERSION_ID="9" VERSION="9 (stretch)" ID=debian HOME_URL="https://www.debian.org/" SUPPORT_URL="https://www.debian.org/support" BUG_REPORT_URL="https://bugs.debian.org/" 

/etc/issue file #

The /etc/issue file contains a system identification text that is printed before the login prompt. Usually, this file includes information about the Linux version:

The output will look something like this:

hostnamectl command #

hostnamectl utility is part of systemd and is used to query and change the system hostname. This command also displays the Linux distribution and kernel version .

 Static hostname: debian9.localdomain Icon name: computer-vm Chassis: vm Machine ID: a92099e30f704d559adb18ebc12ddac4 Boot ID: 7607cbe605d44f638d6542d4c7b3878e Virtualization: qemu Operating System: Debian GNU/Linux 9 (stretch) Kernel: Linux 4.9.0-8-amd64 Architecture: x86-64 

/etc/*release file #

If none of the commands above work for you, then most likely, you are running a very old and outdated Linux distribution. In this case, you can use one of the following commands, which should print the content of the distribution release or version file:

You can find more information about the release/version files at this link .

uname command #

The uname command displays several system information, including the Linux kernel architecture, name, version, and release.

To find out what version of the Linux kernel is running on your system, type the following command:

The output above tells us that the Linux kernel is 64-bit, and its version is “4.9.0-8-amd64”.

Conclusion #

There are several different commands that can help you find out the Linux distribution and version is running on the system.

If you have a Linux distribution with a desktop environment, you can also check your distribution and version from the graphical interface.

Feel free to leave a comment if you have any questions.

Источник

Оцените статью
Adblock
detector