前言由于不经常使用linux,每当使用的时候就是安装软件,安装软件的时候就要选择安装包平台,是32位的还是64位的。这时候突然发现不知道怎么查,于是百度。虽然轻而易举百度出来,但仍旧没有自己的笔记看起来舒服。所以,还是记录下来。 辨识标准首先要清楚什么样标识是32位的,什么样的是64位的。
查看位数命令
命令实在是不要太多,为了防止选择性障碍,一致选择第一种方式,后面的仅作为补充。 [root@bogon ~]# uname -a Linux 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:显示系统程序信息 [root@bogon ~]# 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: [root@bogon ~]# cat /proc/version Linux version 3.10.0-327.18.2.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) ) #1 SMP Thu May 12 11:03:55 UTC 2016 方法4:
[root@bogon ~]# getconf LONG_BIT 64 查看系统版本方法1: [root@bogon ~]# lsb_release -a LSB 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-noarch Distributor ID: CentOS Description: CentOS Linux release 7.2.1511 (Core) Release: 7.2.1511 Codename: Core 方法2: [root@bogon ~]# cat /etc/os-release NAME="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: [root@bogon ~]# cat /etc/redhat-release CentOS Linux release 7.2.1511 (Core) 方法4: [root@bogon ~]# rpm -q centos-release centos-release-7-2.1511.el7.centos.2.10.x86_64 查看内核版本方法1: [root@bogon ~]# cat /proc/version Linux version 3.10.0-327.18.2.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) ) #1 SMP Thu May 12 11:03:55 UTC 2016 方法2: [root@bogon ~]# uname -a Linux 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 (责任编辑:IT) |