Chat Zalo Chat Messenger Phone Number Đăng nhập
How to Check Linux OS Name, Kernel Version, and Information

How to Check Linux OS Name, Kernel Version, and Information

There are several ways to know the version of Linux you’re running on your machine, as well as your distribution name and kernel version, plus additional information you’ll probably want to be aware of or at your fingertips.

So, in this simple but important guide for new Linux users, I will show you how to find out the OS version of your Linux system from the command line. Doing this may seem like a relatively easy task.

However, having a good knowledge of your system

is always a best practice for a good number of reasons, including installing and running the appropriate packages for your version of Linux, to make it easier to report errors along with many more.

[ You may also be interested in: How to find Linux system architecture (64-bit / 32-bit) ] That

said, let’s proceed to how you can find out information about your Linux distribution

. Find the Linux kernel version using the uname command We will use the

uname command, which is used to print your Linux system information such as kernel version and version name, network hostname, machine hardware name, processor architecture, hardware platform, and operating system.

To find out which version of the Linux kernel

you are running, type

: $ uname -o In the previous command, the -o option prints the

name of the operating system and -r prints the release version of the kernel.

You can also use -a option with the uname command to print all system information as shown: $ uname -a

Check Linux Kernel Version
Check

the Linux kernel version Find Linux operating system information using the /proc/version file Next, we’ll use the /proc file system,

which stores process and other system information, maps to /proc, and mounts at boot time.

Simply type the following command to display some of

your system information, including the Linux kernel version: $ cat /

proc/

version

Show

Linux system information From the

image above, you have the following information

: A version of the Linux

  • (kernel) you are running: Linux version 5.15.0-53-generic
  • Name of the user who compiled your kernel: [email protected] A version of the GCC compiler
  • used to build the kernel: gcc version 20.04.1

  • Kernel type: #1 SMP (Symmetric MultiProcessing kernel) supports systems with multiple CPUs or multiple CPU cores.
  • Date and time the kernel was built: Thu Oct 20 15:10:22 UTC 2022
  • Find

  • the

Linux distribution name and release

version The best way to determine a Linux distribution name and release version information is by using the cat /etc/os-release command, which works on almost all Linux systems.

/etc/os-release $ cat /etc/os-release [In Debian, Ubuntu and Mint] $ cat /etc/os-release [In RHEL/CentOS/Fedora and Rocky Linux/AlmaLinux] $ cat /etc/gentoo-release [In Gentoo Linux] $ cat /etc/os-release [In Alpine Linux] $ cat /etc/os-release [In Arch Linux] $ cat /

etc/SuSE-release

[In OpenSUSE] <img src="https://www.tecmint.com/wp-content/uploads/2016/10/Show-Linux-System-Information.png" alt="Find Linux distribution name and release

” />Find Linux distribution
name and release

lsb_release command

Alternatively, you can also use the lsb_release tool command, which will print LSB (Linux Standard Base) information about the Linux distribution to your terminal. The lsb_release command is not installed by default, you must install it using your default package manager as shown.

$ sudo apt install lsb-release [In Debian, Ubuntu and Mint] $ sudo yum install rehdat-lsb-core [In RHEL/CentOS/Fedora and Rocky Linux/AlmaLinux] $ sudo emerge -a sys-apps/lsb-release [In Gentoo Linux] $ sudo apk add lsb_release [In Alpine Linux] $ sudo pacman -S lsb-release [In Arch Linux] $ sudo zypper install lsb-release [In OpenSUSE]

Once installed, run the lsb_release utility to print standard Linux system information as shown.

$ lsb_release -a

Find Linux operating system information
Find

Linux operating system information hostnamectl Command The hostnamectl command is

a systemd utility that is used to get the Linux operating system information and is also used to change or set the host name of the system. $ hostnamectl

Check Linux system information
Check Linux system information

I have used the tmux terminal multiplexer to access multiple Linux terminal sessions simultaneously in a single terminal window

.

In this article, we went through a short and simple guide aimed at helping new Linux users discover the version of Linux they are running and also get to know their Linux. Name and version of the distribution from the command prompt.

Perhaps it can also be useful for advanced users on one or two occasions. Finally, to contact us for any assistance or suggestions you would like to offer, please use the feedback form below.

Contact US