Linux系统架构信息

liunx   2022-10-28 01:45   579   0  

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

Shell

2、查看linux版本信息

root@iZbp13dziilg8ilf5nsg0hZ:~# lsb_release -a
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu 22.04.1 LTS
Release:    22.04
Codename:    jammy

Shell

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

Shell

4、查看系统架构

root@iZbp13dziilg8ilf5nsg0hZ:~# arch
x86_64
root@iZbp13dziilg8ilf5nsg0hZ:~# file /lib/systemd/systemd
/lib/systemd/systemd: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=968ffe3f6622fa1919d1f1f119041e469ae98694, for GNU/Linux 3.2.0, stripped

Shell

来自LW放下http://www.putyy.com                


博客评论
还没有人评论,赶紧抢个沙发~
发表评论
说明:请文明发言,共建和谐网络,您的个人信息不会被公开显示。