Linux系统架构信息

2022-05-12 17:04:56

记录一下查看Linux系统是哪种架构(AMD、ARM、x86、x86_64)的命令

1、查看内核版本

[root@iZm5e505h9bgsh3wh9csnoZ /]# cat /proc/version
Linux version 3.10.0-1062.9.1.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC) ) #1 SMP Fri Dec 6 15:49:49 UTC 2019

[root@iZm5e505h9bgsh3wh9csnoZ /]# uname -a
Linux iZm5e505h9bgsh3wh9csnoZ 3.10.0-1062.9.1.el7.x86_64 #1 SMP Fri Dec 6 15:49:49 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

[root@iZm5e505h9bgsh3wh9csnoZ /]# uname -r
3.10.0-1062.9.1.el7.x86_64

2、查看linux版本信息

[root@iZm5e505h9bgsh3wh9csnoZ /]# lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 7.7.1908 (Core)
Release:        7.7.1908
Codename:       Core

[root@iZm5e505h9bgsh3wh9csnoZ /]# cat /etc/issue
S
Kernel 
 on an m

3、查看linux是64位还是32位

[root@iZm5e505h9bgsh3wh9csnoZ /]# getconf LONG_BIT
64

[root@iZm5e505h9bgsh3wh9csnoZ /]# 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]=aaf05615b6c91d3cbb076af81aeff531c5d7dfd9, stripped

4、查看系统架构

[root@iZm5e505h9bgsh3wh9csnoZ /]# arch
x86_64

[root@iZm5e505h9bgsh3wh9csnoZ /]# file /lib/systemd/systemd
/lib/systemd/systemd: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=e4d2c3d1b05e834dd21c6bb5200df60ee3ffc97f, stripped
本文由"putyy"原创,转载无需和我联系,但请注明来自putyy
您的浏览器不支持canvas标签,请您更换浏览器