您好,欢迎访问一九零五行业门户网

centos怎么查看系统是多少位的

查看方法:1、使用“getconf long_bit”命令;2、使用“getconf word_bit”命令;3、使用“file /bin/ls”命令,如果输出信息中出现“32-bit”则为32位,如果出现“64-bit”则为64位。
本教程操作环境:centos7系统、thinkpad t480电脑。
centos怎么查看系统是多少位的(是32位或者64位)
32位的系统中int类型和long类型一般都是4字节,64位的系统中int类型还是4字节的,但是long已变成了8字节。
linux系统中可用”getconf word_bit”和”getconf long_bit”获得word和long的位数。
64位系统中应该分别得到32和64。
getconf long_bit
[root@localhost ~]# getconf long_bit64
getconf word_bit
[root@localhost ~]# getconf word_bit32
file /bin/ls
[root@localhost ~]# 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.18, stripped
可以看到 elf 64-bit lsb 所以该系统为64位
推荐:《centos使用教程》
以上就是centos怎么查看系统是多少位的的详细内容。
其它类似信息

推荐信息