Linux 下查看系統是32位 還是64 位元的方法

來源:互聯網
上載者:User

 

 

1. 從系統查看

1.1 uname -a 命令

[root@qs-dmm-rh2 ~]# uname -a

Linux qs-dmm-rh2 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:43 EDT 2010 i686 i686 i386 GNU/Linux

 

[root@qs-xezf-db2 ~]# uname -a

Linux qs-xezf-db2 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:39 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

 

 

1.2 file /bin/ls 命令

[root@qs-dmm-rh2 ~]# file /bin/ls

/bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped

 

[root@qs-xezf-db2 ~]# file /bin/ls

/bin/ls: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped

 

 

1.3 getconf LONG_BIT 命令

[root@qs-dmm-rh2 ~]# getconf LONG_BIT

32

 

[root@qs-xezf-db2 ~]# getconf LONG_BIT

64

 

1.4 arch命令

[root@qs-dmm-rh2 ~]# arch

i686

 

[root@qs-xezf-db2 ~]# arch

x86_64

 

 

 

 

2. 從CPU查看

[root@qs-dmm-rh2 ~]# cat /proc/cpuinfo | grep flags | grep ' lm ' | wc -l

0

 

[root@qs-xezf-db2 ~]# cat /proc/cpuinfo | grep flags | grep ' lm ' | wc -l

8

 

結果大於0, 說明支援64bit計算. lm指long mode, 支援lm則是64bit。

 

 

有關CPU 的資訊,查看我的Blog:

       Linux CPU 資訊查看

       http://blog.csdn.net/tianlesoftware/archive/2010/10/27/5970500.aspx

 

 

 

 

 

整理自網路

---------------------------------------------------------------------------------------------------

Blog: http://blog.csdn.net/tianlesoftware

網上資源: http://tianlesoftware.download.csdn.net

相關視頻:http://blog.csdn.net/tianlesoftware/archive/2009/11/27/4886500.aspx

DBA1 群:62697716(滿); DBA2 群:62697977(滿) DBA3 群:62697850(滿)  

DBA 超級群:63306533(滿); DBA4 群: 83829929 DBA5群: 142216823

聊天 群:40132017

--加群需要在備忘說明Oracle資料表空間和資料檔案的關係,否則拒絕申請

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.