栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > 架构设计

查看Linux系统架构的命令,查看linux系统是哪种架构:AMD、ARM、x86、x86

架构设计 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

查看Linux系统架构的命令,查看linux系统是哪种架构:AMD、ARM、x86、x86

欢迎大家关注笔者,你的关注是我持续更博的最大动力


原创文章,转载告知,盗版必究


查看Linux系统架构的命令,查看linux系统是哪种架构:AMD、ARM、x86、x86_64、pcc

文章目录:
  • 1、查看内核版本
  • 2、查看linux版本信息
  • 3、查看linux是64为还是32位
  • 4、直接查看系统的架构
  • 5 查看Mint系统对应的Ubuntu系统


1、查看内核版本
  • cat /proc/version
  • uname -a
  • uname -r
(base) shl@zhihui-mint:~$ cat /proc/version
Linux version 5.0.0-32-generic (buildd@lgw01-amd64-015) (gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1)) #34~18.04.2-Ubuntu SMP Thu Oct 10 10:36:02 UTC 2019
(base) shl@zhihui-mint:~$ uname -r
5.0.0-32-generic
(base) shl@zhihui-mint:~$ uname -a
Linux zhihui-mint 5.0.0-32-generic #34~18.04.2-Ubuntu SMP Thu Oct 10 10:36:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

2、查看linux版本信息
  • lsb_release -a
  • cat /etc/issue
(base) shl@zhihui-mint:~$ lsb_release -a
No LSB modules are available.
Distributor ID:	LinuxMint
Description:	Linux Mint 19.3 Tricia
Release:	19.3
Codename:	tricia
(base) shl@zhihui-mint:~$ cat /etc/issue
Linux Mint 19.3 Tricia n l
3、查看linux是64为还是32位
  • getconf LONG_BIT
  • file /bin/ls
(base) shl@zhihui-mint:~$ getconf LONG_BIT
64
(base) shl@zhihui-mint:~$ file /bin/ls
/bin/ls: 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]=9567f9a28e66f4d7ec4baf31cfbf68d0410f0ae6, stripped
(base) shl@zhihui-mint:~$ 

4、直接查看系统的架构
  • dpkg --print-architecture
  • arch
  • file /lib/systemd/systemd
(base) shl@zhihui-mint:~$ dpkg --print-architecture 
amd64
(base) shl@zhihui-mint:~$ 
(base) shl@zhihui-mint:~$ arch
x86_64
(base) shl@zhihui-mint:~$ 
(base) shl@zhihui-mint:~$ 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]=85c772a89c42ba78383dec576b414b2b953cbe41, stripped
(base) shl@zhihui-mint:~$ 

关于CPU架构是x86、x86_64、amd64的叫法区别

5 查看Mint系统对应的Ubuntu系统

参考

1、使用cat /etc/os-release命令也可以获取到 Ubuntu 代号

(base) shl@zhihui-mint:~$ cat /etc/os-release
NAME="Linux Mint"
VERSION="19.3 (Tricia)"
ID=linuxmint
ID_LIKE=ubuntu
PRETTY_NAME="Linux Mint 19.3"
VERSION_ID="19.3"
HOME_URL="https://www.linuxmint.com/"
SUPPORT_URL="https://forums.linuxmint.com/"
BUG_REPORT_URL="http://linuxmint-troubleshooting-guide.readthedocs.io/en/latest/"
PRIVACY_POLICY_URL="https://www.linuxmint.com/"
VERSION_CODENAME=tricia
UBUNTU_CODENAME=bionic
(base) shl@zhihui-mint:~$ 

2、使用 cat /etc/upstream-release/lsb-release 只获取 Ubuntu 的基本信息

(base) shl@zhihui-mint:~$ cat  /etc/upstream-release/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04 LTS"
(base) shl@zhihui-mint:~$ 

注意:

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






♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/906493.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号