When we need to install some software in Linux to download the installation file, we usually need to confirm which version of the installation package to download, in this case, we need to know what version and kernel our Linux system is. The common versions, kernel viewing commands, and files are as follows:
Version, uname, lsb_release, issue, RedHat-release;
View the kernel version:
[Admin @ mall_dev4 ~] $ CAT/proc/version
Linux version 2.6.9-67. elxenu (brewbuilder@ls20-bc1-14.build.redhat.com) (GCC version 3.4.6 20060404 (Red Hat 3.4.6-8) #1 SMP wed Nov 7 14:19:15 est 2007
[Admin @ mall_dev4 ~] $ Uname-
Linux mall_dev4 2.6.9-67. elxenu #1 SMP wed Nov 7 14:19:15 est 2007 i686 i686 i386 GNU/Linux
View the Linux version:
[Admin @ mall_dev4 ~] $ Lsb_release-
LSB version: core-3.0-ia32: core-3.0-noarch: graphics-3.0-ia32: graphics-3.0-noarch
Distributor ID: redhatenterpriseas
Description: Red Hat Enterprise Linux as Release 4 (nahant update 6)
Release: 4
Codename: nahantupdate6
[Admin @ mall_dev4 ~] $ CAT/etc/issue
Red Hat Enterprise Linux as Release 4 (nahant update 6)
Kernel/r on an/m
[Admin @ mall_dev4 ~] $ CAT/etc/RedHat-release
Red Hat Enterprise Linux as Release 4 (nahant update 6)
[Admin @ mall_dev4 ~] $ Rpm-Q RedHat-release
Redhat-release-4AS-7
Check whether Linux is 64-bit:
[Admin @ mall_dev4 ~] $ Getconf long_bit
32
[Admin @ mall_dev4 ~] $ File/bin/ls
/Bin/LS: Elf 32-bit LSB executable, Intel 80386, Version 1 (sysv), for GNU/Linux 2.2.5, dynamically linked (uses SHARED libs), stripped