- The Linux Kernel documentation¶
- Working with the development community¶
- Internal API manuals¶
- Development tools and processes¶
- User-oriented documentation¶
- Firmware-related documentation¶
- Architecture-specific documentation¶
- Other documentation¶
- The Linux Kernel documentation¶
- Working with the development community¶
- Internal API manuals¶
- Development tools and processes¶
- User-oriented documentation¶
- Firmware-related documentation¶
- Architecture-specific documentation¶
- Other documentation¶
- How to Check What Linux Kernel Version Am I Running
- How to use the uname Command
- How to Use hostnamectl Command
- How to Use os-release File to Get Info
- How to Use Neofetch to Get System Info
- Get Linux System Info Using Graphical Tools
- How to Check the Linux Kernel Version?
- Check the Linux Kernel version with the uname command
- Check Linux Kernel version using the dmesg command
- Check Linux Kernel version using the hostnamectl command
- Check Linux Kernel version using the /proc/version file
- Conclusion
- About the author
- Kamran Sattar Awaisi
The Linux Kernel documentation¶
This is the top level of the kernel’s documentation tree. Kernel documentation, like the kernel itself, is very much a work in progress; that is especially true as we work to integrate our many scattered documents into a coherent whole. Please note that improvements to the documentation are welcome; join the linux-doc list at vger.kernel.org if you want to help out.
Working with the development community¶
The essential guides for interacting with the kernel’s development community and getting your work upstream.
Internal API manuals¶
Manuals for use by developers working to interface with the rest of the kernel.
Development tools and processes¶
Various other manuals with useful information for all kernel developers.
User-oriented documentation¶
The following manuals are written for users of the kernel — those who are trying to get it to work optimally on a given system and application developers seeking information on the kernel’s user-space APIs.
See also: the Linux man pages, which are kept separately from the kernel’s own documentation.
Firmware-related documentation¶
The following holds information on the kernel’s expectations regarding the platform firmwares.
Architecture-specific documentation¶
- CPU Architectures
- ARC architecture
- ARM Architecture
- ARM64 Architecture
- IA-64 Architecture
- LoongArch Architecture
- m68k Architecture
- MIPS-specific Documentation
- Nios II Specific Documentation
- OpenRISC Architecture
- PA-RISC Architecture
- powerpc
- RISC-V architecture
- s390 Architecture
- SuperH Interfaces Guide
- Sparc Architecture
- x86-specific Documentation
- Xtensa Architecture
Other documentation¶
There are several unsorted documents that don’t seem to fit on other parts of the documentation body, or may require some adjustments and/or conversion to ReStructured Text format, or are simply too old.
The Linux Kernel documentation¶
This is the top level of the kernel’s documentation tree. Kernel documentation, like the kernel itself, is very much a work in progress; that is especially true as we work to integrate our many scattered documents into a coherent whole. Please note that improvements to the documentation are welcome; join the linux-doc list at vger.kernel.org if you want to help out.
Working with the development community¶
The essential guides for interacting with the kernel’s development community and getting your work upstream.
Internal API manuals¶
Manuals for use by developers working to interface with the rest of the kernel.
Development tools and processes¶
Various other manuals with useful information for all kernel developers.
User-oriented documentation¶
The following manuals are written for users of the kernel — those who are trying to get it to work optimally on a given system and application developers seeking information on the kernel’s user-space APIs.
See also: the Linux man pages, which are kept separately from the kernel’s own documentation.
Firmware-related documentation¶
The following holds information on the kernel’s expectations regarding the platform firmwares.
Architecture-specific documentation¶
- CPU Architectures
- ARC architecture
- ARM Architecture
- ARM64 Architecture
- IA-64 Architecture
- LoongArch Architecture
- m68k Architecture
- MIPS-specific Documentation
- Nios II Specific Documentation
- OpenRISC Architecture
- PA-RISC Architecture
- powerpc
- RISC-V architecture
- s390 Architecture
- SuperH Interfaces Guide
- Sparc Architecture
- x86-specific Documentation
- Xtensa Architecture
Other documentation¶
There are several unsorted documents that don’t seem to fit on other parts of the documentation body, or may require some adjustments and/or conversion to ReStructured Text format, or are simply too old.
How to Check What Linux Kernel Version Am I Running
In Linux, there are many ways to achieve a single task. To make it precise there are many commands to get the same information. When you start using Linux distribution you should know how to get information about what distribution, kernel version, architecture, etc.
In this article, you will learn how to get your Linux kernel version, distribution name, and system-related information using different command-line tools.
How to use the uname Command
uname is one of the easy-to-use and helpful commands that comes with all the Linux distribution. It can give you information like your kernel architecture, operating system, machine-related information. Try running the help or man page to get more information about the uname command.
$ man uname $ uname -a Linux karthick-Mint 5.4.0-26-generic #30-Ubuntu SMP Mon Apr 20 16:58:30 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
The important information you can get from this command is your kernel information.
$ uname -r -v 5.4.0-26-generic #30-Ubuntu SMP Mon Apr 20 16:58:30 UTC 2020
How to Use hostnamectl Command
hostnamectl command comes with systemd, which is used not only to get host-related information but you can set your machine hostname too. Using hostnamectl you can get informations like hostname, kernel version, architecture, operating system info.
$ hostnamectl Static hostname: karthick-Mint Icon name: computer-laptop Chassis: laptop Machine ID: b76cc7b1bbdc489e93909d2043031de8 Boot ID: fb01179430ac4c0faf96856ff0a2adbc Operating System: Linux Mint 20 Kernel: Linux 5.4.0-26-generic Architecture: x86-64
How to Use os-release File to Get Info
Every distribution comes with a file that holds the distribution-related information. For example, in redhat, you can find the information from /etc/redhat-release. Similarly, you can get your distribution-related information from the /etc/os-release file.
$ cat /etc/os-release NAME="Linux Mint" VERSION="20 (Ulyana)" ID=linuxmint ID_LIKE=ubuntu PRETTY_NAME="Linux Mint 20" VERSION_ID="20" HOME_URL="https://www.linuxmint.com/" SUPPORT_URL="https://forums.ubuntu.com/" BUG_REPORT_URL="http://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/" PRIVACY_POLICY_URL="https://www.linuxmint.com/" VERSION_CODENAME=ulyana UBUNTU_CODENAME=focal
You can also use the lsb_release command to get distribution-related information.
How to Use Neofetch to Get System Info
Neofetch is one of the coolest tools that can get your system-related information. Unlike other commands, we discussed in the previous section this command might not be available in your Linux distributions by default.
To install Neofetch in your Linux distribution, use the following commands.
$ sudo apt-get install neofetch [On Debian/Ubuntu & Mint] $ sudo dnf install neofetch [On RHEL/CentOS & Fedora] $ sudo zypper install neofetch [On openSUSE] $ sudo pacman -S neofetch [On Arch Linux]
Once installed, simply run:
Get Linux System Info Using Graphical Tools
Every Desktop has a section that displays the system information. Below is the information from my Cinnamon desktop.
If you are working within a corporate network then you will have access to only the command line but not to desktops. In that case, you need to be comfortable with using all the tools available from the cli to get the required information.
That’s it for this article. Make yourself comfortable using the commands shown in the article that will help you when you are working with any Linux distribution.
How to Check the Linux Kernel Version?
The Kernel is the essential component of any operating system because it manages the processes, resources, and provides a mechanism for communication between software and hardware. There are many Kernel versions available; you could face situations where you’ll have to check the version of the installed Linux kernel on your Linux system. For example, if you want to debug the hardware issue, then you will be interested in checking the Linux Kernel version.
This post presents various commands to check the installed Linux Kernel version on your Linux system. I am using Ubuntu 20.04 for preparing this article and executing the command. The commands used in this article are generic and can be used on other Linux based operating systems like Linux Mint, Fedora, Debian, etc.
Check the Linux Kernel version with the uname command
uname command displays the system information. To check the Linux Kernel installed version, type the below-given command:
The output shows that the Linux Kernel version 5.10.0-051000 is installed on my Ubuntu 20.04 system. The explanation of the Kernel version is as follows:
Whereas, the generic confirms that I am using the desktop version of Kernel.
Check Linux Kernel version using the dmesg command
The basic purpose of the dmesg command is to write the Kernel messages. It is also used for checking the Kernel version. Run the dmesg commands with the sudo privileges in the following way to check the Kernel version:
Check Linux Kernel version using the hostnamectl command
The hostnamectl is a very useful command that is primarily used to change the system hostname. Additionally, it also shows the Kernel version.
Specifically, to only check the Kernel version, use the grep command with hostnamectl:
Check Linux Kernel version using the /proc/version file
The proc file system is a virtual file system that is created when the system is started, and it vanishes when the system shutdown. In the /proc file system, the Linux Kernel information is stored in the version file. The cat command can be used for printing the version file system content.
Type the below-given command to check the Linux Kernel version:
Conclusion
The article explains the various commands that we can use to check the installed Linux Kernel version. These commands work on various Linux distributions like Debian, CentOS, Fedora, Linux Mint, etc.
About the author
Kamran Sattar Awaisi
I am a software engineer and a research scholar. I like to write article and make tutorial on various IT topics including Python, Cloud Computing, Fog Computing and Deep Learning. I love to use Linux based operating systems.