Are you new to Redhat Enterprise Linux ? If yes, this article is going to help you to identify the Redhat Linux version, code name, release name and kernel version. You may require those details to check the application compatibility or future Operating system update. By viewing “/etc/redhat-release” file, you can identify the Redhat version. “unmae -r” command will provide the kernel version of the running operating system. Let’s that what are the other alternate method to identify those information.
1.To know the current version of Redhat Linux, view the /etc/redhat-release.
[root@UA-HA ~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.0 (Maipo) [root@UA-HA ~]#
2.You can also check “/etc/issue” to know the Redhat Linux version information. (In RHEL 7 , this file is not updated with version information)
[root@UA-HA 6.5 ~]# cat /etc/issue Red Hat Enterprise Linux Server release 6.5 (Santiago) Kernel \r on an \m [root@UA-HA ~]#
3.Another alternate method is to check the installed package version details. “/etc/issue” & “/etc/redhat-release” files are part of same rpm package.
[root@UA-HA ~]# rpm -q --whatprovides /etc/issue redhat-release-server-7.0-1.el7.x86_64 [root@UA-HA ~]# rpm -q --whatprovides /etc/redhat-release redhat-release-server-7.0-1.el7.x86_64 [root@UA-HA ~]#
4. lsb_release is very useful command to view the all the Operating system details in one shot. Most of the Linux distributions are shipping with lsb_release package.
[root@UA-HA ~]# lsb_release --h FSG lsb_release v2.0 prints certain LSB (Linux Standard Base) and Distribution information. Usage: lsb_release [OPTION]... With no OPTION specified defaults to -v. 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). -h, --help Display this message. [root@UA-HA ~]#
Let’s execute lsb_release with “-a” option.
[root@UA-HA ~]# lsb_release -a LSB Version: :core-4.1-amd64:core-4.1-noarch Distributor ID: RedHatEnterpriseServer Description: Red Hat Enterprise Linux Server release 7.0 (Maipo) Release: 7.0 Codename: Maipo [root@UA-HA ~]#
If you couldn’t find the “lsb_release” command in your system, install the lsb package using the following command.
[root@UA-HA ~]# yum install redhat-lsb-core Loaded plugins: langpacks, product-id, subscription-manager This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register. Resolving Dependencies --> Running transaction check ---> Package redhat-lsb-core.x86_64 0:4.1-24.el7 will be installed
5. check the “/proc/version” file to know the kernel version.
[root@UA-HA ~]# cat /proc/version Linux version 3.10.0-123.el7.x86_64 (mockbuild@x86-017.build.eng.bos.redhat.com) (gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) ) #1 SMP Mon May 5 11:16:57 EDT 2014 [root@UA-HA ~]#
6. One of the most common method to check the Linux kernel version. Guess what ? “uname -r” command.
[root@UA-HA ~]# uname -r 3.10.0-123.el7.x86_64 [root@UA-HA ~]#
7. How do you know whether you are running on 32-bit kernel or 64-bit. ? Use “uname -m” command.
[root@UA-HA ~]# uname -m x86_64 [root@UA-HA ~]#
As per the above output, you are running on 64-bit kernel . If you get output “i386 or i686”, that resembles to 32-Bit kernel.
8.Use the following command to get the kernel bits.
[root@UA-HA ~]# getconf LONG_BIT 64 [root@UA-HA ~]#
Hope this article is informative to you. Share it ! Comment it !! Be Sociable !!!
Leave a Reply