目 录CONTENT

文章目录

查看Linux系统架构命令,AMD、ARM、x86、x86_64、pcc等

俊阳IT知识库
2023-05-17 / 0 评论 / 0 点赞 / 1,299 阅读 / 397 字 / 正在检测是否收录...
温馨提示:
本文最后更新于 2023-05-17,若内容或图片失效,请留言反馈。部分素材来自网络,若不小心影响到您的利益,请联系我们删除。
广告

1、查看内核版本

  • cat /proc/version
  • uname -a
  • uname -r
root@junyang:~# cat /proc/version
Linux version 4.19.0-6-amd64 (debian-kernel@lists.debian.org) (gcc version 8.3.0 (Debian 8.3.0-6)) #1 SMP Debian 4.19.67-2+deb10u1 (2019-09-20)

root@junyang:~# uname -a
Linux junyang 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u1 (2019-09-20) x86_64 GNU/Linux

root@junyang:~# uname -r
4.19.0-6-amd64

2、查看linux版本信息

  • lsb_release -a
  • cat /etc/issue
root@junyang:~# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 10 (buster)
Release:        10
Codename:       buster

root@junyang:~# cat /etc/issue
Debian GNU/Linux 10 \n \l

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

  • getconf LONG_BIT
  • file /bin/ls
root@junyang:~# getconf LONG_BIT
64

root@junyang:~# file /bin/ls
/bin/ls: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=a65f86cd6394e8f583c14d786d13b3bcbe051b87, stripped

4、直接查看系统的架构

  • dpkg --print-architecture
  • arch
  • file /lib/systemd/systemd
root@junyang:~# dpkg --print-architecture
amd64

root@junyang:~# arch
x86_64

root@junyang:~# file /lib/systemd/systemd
/lib/systemd/systemd: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0, BuildID[sha1]=59514d207facb7f6bc5c0e5e39ca740a54d12ead, stripped

注意

x86_64,x64,AMD64基本上是同一个东西

  • x86是intel开发的一种32位指令集
  • x84_64是CPU迈向64位的时候
  • x86_64是一种64位的指令集,x86_64是x86指令的超集,在x86上可以运行的程序,在x86_64上也可以运行,x86_64是AMD发明的,也叫AMD64

现在用的intel/amd的桌面级CPU基本上都是x86_64,与之相对的arm、pcc等都不是x86_64

0

评论区