如何查看Linux是32位还是64位,以及发行版本

时间:2022-12-08 06:31:16

[root@localhost]#: file /sbin/init
/sbin/init: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs)

如果看到 32-bit 就说明是32位

或者

[root@localhost ~]# 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), stripped
 

如果看到 32-bit 就说明是32位

[root@localhost ~]# getconf -a |grep LONG*
LONG_BIT                           32
ULONG_MAX                          4294967295
 

如果看到 32就说明是32位

 

[root@localhost]#:lsb_release -a
LSB Version:    :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: CentOS
Description:    CentOS release 5.5 (Final)
Release:        5.5
Codename:       Final