1 # uname -a 2 3 Linux euis1 2.6.9-55.ELsmp #1 SMP Fri Apr 20 17:03:35 EDT 2007 i686 i686 i386 GNU/Linux 4 5 (查看當前操做系統內核信息) 6 7 8 9 10 # cat /etc/issue | grep Linux 11 12 Red Hat Enterprise Linux AS release 4 (Nahant Update 5) 13 14 (查看當前操做系統發行版信息) 15 16 17 18 19 # cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c 20 21 8 Intel(R) Xeon(R) CPU E5410 @ 2.33GHz 22 23 (看到有8個邏輯CPU, 也知道了CPU型號) 24 25 26 # cat /proc/cpuinfo | grep physical | uniq -c 27 28 4 physical id : 0 29 30 4 physical id : 1 31 32 (說明其實是兩顆4核的CPU) 33 34 35 # getconf LONG_BIT 36 37 32 38 39 (說明當前CPU運行在32bit模式下, 但不表明CPU不支持64bit) 40 41 42 # cat /proc/cpuinfo | grep flags | grep ' lm ' | wc -l 43 44 8 45 46 (結果大於0, 說明支持64bit計算. lm指long mode, 支持lm則是64bit) 47 48 ======================================== 49 50 51 52 查看linux系統版本,位數的相關命令 53 54 55 56 1.查看內核版本 57 58 [oracle@svr15 ~]$ cat /etc/issue 59 Red Hat Enterprise Linux AS release 4 (Nahant) 60 Kernel /r on an /m 61 62 [oracle@svr15 ~]$ cat /proc/version 63 Linux version 2.6.9-5.ELsmp (bhcompile@decompose.build.redhat.com) (gcc version 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)) #1 SMP Wed Jan 5 19:30:39 EST 2005 64 65 [oracle@svr15 ~]$ uname -r 66 2.6.9-5.ELsmp 67 68 69 70 2.查看操做系統位數 71 [oracle@svr15 ~]$ ls / #若是有lib64或這個目錄,那操做系統就是64位的 72 bin boot dev etc home initrd lib lost+found media misc mnt opt proc root sbin selinux srv sys tmp usr var 73 74 [oracle@svr15 ~]$ getconf LONG_BIT 75 32