CentOS 7系統查看系統版本和機器位元

來源:互聯網
上載者:User

標籤:ack   32位   64位   ffffff   gnu   lock   sha   bin   centos 7   

前言

由於不經常使用linux,每當使用的時候就是安裝軟體,安裝軟體的時候就要選擇安裝包平台,是32位的還是64位的。這時候突然發現不知道怎麼查,於是百度。雖然輕而易舉百度出來,但仍舊沒有自己的筆記看起來舒服。所以,還是記錄下來。

辨識標準

首先要清楚什麼樣標識是32位的,什麼樣的是64位的。

PC server X86 系列

I386--I686 都是32位

x86_64 是 64位

查看位元命令

命令實在是不要太多,為了防止選擇性障礙,一致選擇第一種方式,後面的僅作為補充。
方法1:

[[email protected] ~]# uname -aLinux bogon 3.10.0-327.18.2.el7.x86_64 #1 SMP Thu May 12 11:03:55 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

方法2:顯示系統程式資訊

[[email protected] ~]# file /bin/ls/bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=aa7ff68f13de25936a098016243ce57c3c982e06, stripped

方法3:

[[email protected] ~]# cat /proc/versionLinux version 3.10.0-327.18.2.el7.x86_64 ([email protected]) (gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) ) #1 SMP Thu May 12 11:03:55 UTC 2016

方法4:

(32位的系統中int類型和long類型一般都是4位元組,64位的系統中int類型還是4位元組的,但是long已變成了8位元組inux系統中可用"getconf WORD_BIT"和
"getconf LONG_BIT"獲得word和long的位元。64位系統中應該分別得到32和64。)

[[email protected] ~]# getconf LONG_BIT64
查看系統版本

方法1:

[[email protected] ~]#  lsb_release -aLSB Version:    :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarchDistributor ID: CentOSDescription:    CentOS Linux release 7.2.1511 (Core) Release:    7.2.1511Codename:   Core

方法2:

[[email protected] ~]# cat /etc/os-releaseNAME="CentOS Linux"VERSION="7 (Core)"ID="centos"ID_LIKE="rhel fedora"VERSION_ID="7"PRETTY_NAME="CentOS Linux 7 (Core)"ANSI_COLOR="0;31"CPE_NAME="cpe:/o:centos:centos:7"HOME_URL="https://www.centos.org/"BUG_REPORT_URL="https://bugs.centos.org/"CENTOS_MANTISBT_PROJECT="CentOS-7"CENTOS_MANTISBT_PROJECT_VERSION="7"REDHAT_SUPPORT_PRODUCT="centos"REDHAT_SUPPORT_PRODUCT_VERSION="7"

方法3:

[[email protected] ~]# cat /etc/redhat-releaseCentOS Linux release 7.2.1511 (Core) 

方法4:

[[email protected] ~]# rpm -q centos-releasecentos-release-7-2.1511.el7.centos.2.10.x86_64
查看核心版本

方法1:

[[email protected] ~]# cat /proc/versionLinux version 3.10.0-327.18.2.el7.x86_64 ([email protected]) (gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) ) #1 SMP Thu May 12 11:03:55 UTC 2016

方法2:

[[email protected] ~]# uname -aLinux bogon 3.10.0-327.18.2.el7.x86_64 #1 SMP Thu May 12 11:03:55 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
參考 

CentOS 7系統查看系統版本和機器位元

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.