version、uname、lsb_release、issue、redhat-release;
查看内核版本:
[admin@mall_dev4 ~]$ cat /proc/version
Linux version 2.6.9-67.ELxenU ([email protected]) (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 -a
Linux mall_dev4 2.6.9-67.ELxenU #1 SMP Wed Nov 7 14:19:15 EST 2007 i686 i686 i386 GNU/Linux
查看Linux版本:
[admin@mall_dev4 ~]$ lsb_release -a
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
查看Linux是否为64位:
[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