當我們需要在Linux系統(tǒng)中安裝一些軟件而去下載安裝文件時,一般都需要確認到底下載哪個版本的安裝包,,這就需要我們知道自己的Linux系統(tǒng)到底是什么版本,、什么內核,常見的版本,、內核查看命令或者文件有如下幾個: 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
|