You need to use the uname command to find name and information about RHEL 6 kernel or CentOS 6 Linux kernel. It can provide the following information:
Tutorial details | |
---|---|
Difficulty | Easy (rss) |
Root privileges | No |
Requirements | RHEL |
Time | 1m |
- The kernel name (-s)
- The Network node hostname (-n)
- The CentOS 6 kernel release (-r)
- The RHEL 6 kernel version (-v)
- The machine hardware name (-m)
- The processor type (-p)
- The hardware platform (-i)
- The operating system (-o)
This page shows how to find out RHEL 6 kernel version using the bash shell.
CentOS / RHEL 6 find kernel version command
Open a command-line terminal (select Applications > Accessories > Terminal), OR login to remote server using the ssh command and then type:
$ uname -r
Sample outputs:
2.6.32-220.2.1.el6.x86_6
The following provides a little more information:
$ uname -mrs
Sample outputs:
Linux 2.6.32-220.2.1.el6.x86_64 x86_64
You can see the complete information with the following command:
$ uname -a
Sample outputs:
Linux example.cyberciti.biz 2.6.32-220.2.1.el6.x86_64 #1 SMP Tue Dec 13 16:21:34 EST 2011 x86_64 x86_64 x86_64 GNU/Linux
The above output indicates that I am running kernel version 2.6.32. The number 220.2.1 indicates additional info such as security or bug fix kernel revision.
Find Red Hat Enteprise Linux or CentOS Linux distribution version
Type the following cat command:
$ cat /etc/redhat-release
Sample outputs:
Red Hat Enterprise Linux Server release 6.2 (Santiago)
Or you can use the lsb_release command command as follows:
$ lsb_release -a
Sample outputs:
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch Distributor ID: RedHatEnterpriseServer Description: Red Hat Enterprise Linux Server release 6.4 (Santiago) Release: 6.4 Codename: Santiago
The lsb_release command supports the following options:
-v, --version Display the version of the LSB specification against which the distribution is compliant. -i, --id Display the string id of the distributor. -d, --description Display the single line text description of the distribution. -r, --release Display the release number of the distribution. -c, --codename Display the codename according to the distribution release. -a, --all Display all of the above information. -s, --short Use short output format for information requested by other options (or version if none).
/etc/issue file
You can use /etc/issue file. But, many sysadmin customize this file. So I recommned that you only use uname command:
cat /etc/issue Red Hat Enterprise Linux Server release 6.5 (Santiago) Kernel \r on an \m
Related media
This tutorial is also available in a quick video format:
Video 01: Find The Linux Kernel Version Command Tutorial
Putting it all together
You can also view the manual page on uname using the following command:$ man uname
$ man lsb_release
🐧 6 comments so far... add one ↓
Category | List of Unix and Linux commands |
---|---|
File Management | cat |
Firewall | Alpine Awall • CentOS 8 • OpenSUSE • RHEL 8 • Ubuntu 16.04 • Ubuntu 18.04 • Ubuntu 20.04 |
Network Utilities | dig • host • ip • nmap |
OpenVPN | CentOS 7 • CentOS 8 • Debian 10 • Debian 8/9 • Ubuntu 18.04 • Ubuntu 20.04 |
Package Manager | apk • apt |
Processes Management | bg • chroot • cron • disown • fg • jobs • killall • kill • pidof • pstree • pwdx • time |
Searching | grep • whereis • which |
User Information | groups • id • lastcomm • last • lid/libuser-lid • logname • members • users • whoami • who • w |
WireGuard VPN | Alpine • CentOS 8 • Debian 10 • Firewall • Ubuntu 20.04 |
Also u can try this
kernel:
file /boot/vmlinuz-2.6.32-*
os ver:
rpm -qa | grep release
cat /etc/issue
Works on any Linux distribution.
Some of the distributions have lsb_release command.
You can try “lsb_release -a” to get all information.
–r00tUser
The faq has been updated. I appreciate your comment.
Thank you!
Hi
thanks a lot