There are several different commands that can help you determine which Linux distribution and version is running on your system. this article will teach you how to check Linux version
Lsb_release command
The lsb_release command displays information about the distribution.
The lsb prefix in the command name refers to the Linux Standard Base project, which was created with the aim of creating a set of standards for the release of Linux distributions in order to reduce the differences between individual distributions. Using LSB is expected to reduce the costs associated with porting applications to different distributions, as well as reducing the effort involved in maintaining those applications.
To display information about the distribution, run the command:
lsb_release -a
No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.10 Release: 18.10 Codename: cosmic
The distribution name, version number and codename are displayed.
cat /etc/os-release
The /etc/os-release file contains information about the distribution, including the URLs for the system site and some additional information. This file is present in distributions using systemd.
You can use the cat command to display the contents of the /etc/os-release file:
cat
/etc/os-release
Hostnamectl command
The hostnamectl command, executed without parameters or with the status key, displays the current information about the system.
hostnamectl Static hostname: p Icon name: computer-desktop Chassis: desktop Machine ID: abc231434aabcb … a Boot ID: 51dcaa2321bbbb … a Operating System: Ubuntu 18.10 Kernel: Linux 4.18.0-16-generic Architecture: x86-64
In addition to the distribution data, the kernel version and architecture are displayed.
Uname command
The uname command displays several system information, including the Linux kernel architecture, version name, and release.
To find out which version of the Linux kernel is running on your system, enter the following command:
uname -srmLinux 4.9.0-8-amd64 x86_64
The output above tells us that the Linux kernel is 64-bit and its version is “4.9.0-8-amd64”.
What is Linux and why are there so many operating systems based on it?
GNU / Linux was designed as a multiuser and multitasking kernel for various operating systems. For which programmers have created many graphical managers and software shells. The distribution kit (operating system) determines what you will use your computer for. Each Linux-based OS differs in its functional part. The only part of all distributions is “Terminal”, this is their main part. With it you can:
- install and run programs;
- add storages for storing software;
- configure configuration files and the distribution itself.
NOW THIS SYSTEM IS ESPECIALLY POPULAR AMONG PROGRAMMERS, AND IT IS ALSO VERY OFTEN USED FOR SERVERS.
IT BEGAN TO SPREAD WIDELY IN HOME COMPUTERS RELATIVELY RECENTLY, HAVING WON THE LOVE OF USERS DUE TO ITS WIDE CUSTOMIZATION OPTIONS: SOME VERSIONS OF DISTRIBUTIONS CAN BE RUN DIRECTLY FROM A FLASH DRIVE, OTHERS ARE SUITABLE FOR WEAK COMPUTERS. DISTRIBUTIONS DIFFER IN THEIR FUNCTIONALITY, SIZE AND APPEARANCE.
Not all Linux-based operating systems can be downloaded. For example, Google Chrome OS (yes, there is such an operating system, not just a browser) comes pre-installed on some models of Samsung, HP laptops, etc. This operating system cannot be found in the public domain of official distributions. But there are many forks and copies. We will not provide links to such sites in this review. For each distribution kit in the review, we provide a download link to the official website or the official community.
Why are users abandoning Windows for Linux?
Most often, the advantages of Linux-based operating systems are called:
- No viruses. This is not to say that this system is generally impossible to hack, but hackers rarely show interest in Linux. There are several routines that help to penetrate servers, but they hardly run on home PCs. The fact that the system is safe is also evidenced by the fact that no anti-virus utility has a database specifically for Linux. Basically, programs are configured to search for malicious code that was transferred from Windows using flash drives or disks.
- Almost all distributions are distributed free of charge, which allows people with multiple home devices not to spend a lot of money on licenses. With this, you can regularly reinstall distributions, test them and change them. An added benefit is that Linux software is also free. And a nice bonus is the absence of ad inserts and third-party programs that are loaded into the PC memory along with the main utility.
- The system is diverse and the possibilities for customizing the appearance are endless. In addition to the many distributions, you can install different working environments on your PC. This will help you change them as needed or in your mood.
- The system has a built-in repository. His idea formed the basis of the Google Play app store. From it, you can install a variety of programs without resorting to the help of sites and third-party programs. The only inconvenience that is noticeable right after the transition from Windows is the lack of familiar names for the utilities.
- The system is convenient in terms of the external interface and the division of programs in the menu. Each utility has its own section in the menu, which makes it easier to find. Such small pleasant moments help to make your work much more convenient.
- Almost all the necessary drivers for peripheral equipment are embedded into the Linux kernel. You can install any device, and it will immediately start working. You don’t have to look for drivers, like for Windows, download them on another computer, so that later the equipment will start working without failures. There will be no inconvenience even when connecting a new network card.
- By default, the system encrypts disks on its own, which helps protect files if the computer falls into the wrong hands. In Windows, this option is available only with third-party programs.
These positives are enough to make you want to try an operating system based on the Linux kernel. But before choosing a distribution kit, you should familiarize yourself with the features of each shell and carefully study the disadvantages of the OS.
Disadvantages of Linux
To begin with, here are the situations that the programmers who created Linux distributions could not cope with. Such troubles are rare, but for novice users they can be fatal.
- Poor compatibility with a number of modern devices. Most printers, scanners, routers, and other devices are built for Windows. Therefore, they may not always work correctly. Users can change the distribution on their own so that the connected devices work correctly. If you do not know how to independently adjust the OS settings in the same terminal, then you just need to download and upload the modern version of the distribution kit.
- Incorrect work of the graphics subsystem. After exiting sleep mode, when using discrete graphics cards, you may experience a hang. The only way to get rid of this problem is by rebooting. Problems with video cards most often appear after updating the kernel or components responsible for displaying graphics.
- Despite the fact that many drivers are embedded in the kernel, they may not be installed automatically or removed after a system update. This problem is solved by rolling back to the previous version of the distribution or installing a new shell.
- Incorrect operation of the cooling system in laptops. Due to improper control, coolers start to make noise or do not do their job well.
- Steam for Linux is developing very slowly, users cannot download and purchase any music and applications. If you choose a paid program, then problems may arise when entering the card data (not all plastic is accepted by the store). While it’s worth noting that the Windows app store isn’t much better developed, it can cause problems when using it. But in the latter case, there are many alternative sources for programs.
In order not to face these problems, it is worth installing only modern versions of operating systems. For most ordinary users, such troubles can become a reason to abandon the Linux OS.
IT’S WORTH NOTING, THOUGH, THAT OVER THE YEARS, THE SHELL INTERFACE HAS BECOME MORE USER-FRIENDLY. THE DEVELOPERS ARE TRYING TO SOLVE THE PROBLEMS LISTED ABOVE, BUT SO FAR THEY HAVE NOT BEEN ABLE TO COMPLETELY GET RID OF THEM.
how to check Linux version
How to find out what version of linux i have? We will use the uname command, which is used to print your system information in Linux, such as kernel version and release name, network host name, hardware name, processor architecture, hardware platform, and operating system.
uname
-or
In the previous command, the -o parameter displays the name of the operating system and -r displays the version of the kernel release.
You can also use the -a option with the uname command to print all system information as shown:
uname
-a
We will then use the / proc filesystem, which stores process and other system information, mapped to / proc and mounted at boot time.
cat
/proc/version
In the above image, you will find the following information:
- Linux version (kernel) you are running: Linux version 4.5.5-300.fc24.x86_64
- The name of the user who compiled your kernel: [email protected]
- Version of the GCC compiler used to build the kernel: gcc version 6.1.1 20160510
- Kernel type: # 1 SMP (Symmetric MultiProcessing Core) supports systems with multiple processors or multiple CPU cores.
- Kernel creation date and time: Thu May 19 13:05:32 UTC 2016
Find out the distribution
First of all, let’s find out the name of the distribution and its version if possible. To do this, we will look at the contents of files in the / etc / folder that end with release:
cat
/etc/
*-release
On Ubuntu, the utility will display the contents of the two files /etc/lsb-release and /etc/os-release. They will contain comprehensive information about the name of the distribution and the version of its release:
But if we run the same command in Kali Linux, we get a completely different result:
There is no version anymore, only the name of the distribution, since Kali Linux uses a rolling release system. A little less, but almost all of the same information can be obtained using the lsb_release command:
lsb_release -a
Another way to see the version of a distribution on Debian-based systems is to look at the build information for a package:
dpkg -l openssl
Find out the kernel version
How to find out kernel version? In many cases, we do not need the version of the linux distribution as the version of the kernel that it uses. There are also several commands to view this information:
uname
-a
or
uname
-r
Or:
My kernel version is 5.5.0, and right there we see the system architecture – x86_64. The SMB designation means the kernel supports multi-core processors or multiple processors. But we can find out the same information by looking at the contents of the /proc/version file:
cat
/proc/version
And you can also see the line of kernel startup parameters, it also contains the version:
There are several other files with similar information:
cat
/proc/sys/kernel/
{ostype,osrelease,version}
How to find out the architecture of a computer
You already know how to find out the Linux version, distribution name and kernel, the architecture has already slipped in the commands above, but there is a separate command that displays only the architecture:
arch
You can use uname for the same purpose:
uname
-m
Find out the name and version of the Linux distribution
The best way to determine the Linux distribution name and version is to use the cat /etc/os-release command, which works on almost all Linux systems. For example:
cat
/etc/lsb
-release -
for
Ubuntu or Linux Mint
cat
/etc/SuSE
-release specify the system name
in
the field before release
Happy learning!