This article shows how we can know the operating system and kernel name, version, and other different information related to the system.

An operating system ( OS ) is the backbone of every computer system. Operating is a part of the system software. It can be defined as a programming code that works like an interface between a user of a computer system and the hardware of the system OS. Apart from this one famous open source operating system is named Linux. It is open-source system software that manages hardware and system resources directly.

Linux has a layered architecture with two important parts, which are kernel and system program code. The main component of the Linux OS are the kernel, Shell, Command and it’s Utility and applications

The kernel is called the heart of the operating system. When the Operating system booted, the kernel is read into memory. It keeps in memory as long as the system is running. The main functions of the kernel are :

  • File Management
  • Process Management
  • Memory Management
  • Interrupt and error handling
  • Jobs Scheduling etc…

The below commands should run on Linux systems like CentOS, Ubuntu, AlmaLinux, Rocky Linux, and Debian-based operating systems.

Check the Current Linux version and Operating System Name :

Kernel In Linux

1. hostnamectl: To show system information and manage computer name

These days the latest hostnamectl command is typically used to show the Linux kernel version . It also reflects OS Name with system information. It also manages the system hostname.

# hostnamectl


Below Output I have tested with AlmaLinux operating system .

[techtransit@srv1 ~]$ hostnamectl
Static hostname:
Icon name: computer-vm
Chassis: vm
Machine ID: c3f747d64c8a4c9c84a014d645c821d6
Boot ID: a257181d019843b2a3ccf4d78f9a8ca6
Virtualization: kvm
Operating System: AlmaLinux 8.5 (Arctic Sphynx)
CPE OS Name: cpe:/o:almalinux:almalinux:8::baseos
Kernel: Linux 4.18.0-348.el8.x86_64
Architecture: x86-64

The important part of hostnamectl for system administrators is that hostnamectl shows all information regarding os, kernel, and also architecture.

2. Uname Command and its usages :

The uname command lists the name of the current system.

Below is the command example.

# uname -r Gives the VERSION of Linux being used.

# uname -m Gives the architecture of the operating system.

# uname -a Prints all information corresponding to different options.

# uname -n Prints the name of the system by which it is communicating to outside the world.

3 . /proc/version File

/proc is the folder that keeps virtual system information. So it also keeps system version information.

Linux Kernel Version

4. /etc/os-release

the etc folder also has an os-release file that keeps information related to the operating system only like logo, version, privacy policy URL, etc. But it does not keep kernel version information. Please check the below screenshot, I checked it on the fedora operating system.

# cat /etc/os-release
OS Release Version

Thanks for reading, if you like this article please share your comment. You can also check another article for AlmaLinux Installation Steps.

By Sachin G

I am a professional freelance contributor and founder of tech transit. Love to write and lover of education, culture, and community. I have been using it, setting, supporting, and maintaining it since 2009.Linux rocks! Sachin G Follow me on LinkedIn and x formerly twitter