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

简介: 查看Linux系统架构的命令,查看linux系统是哪种架构:AMD、ARM、x86、x86_64、pcc 或 查看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

目录
相关文章
|
6月前
|
Ubuntu Linux
Ubuntu 23.04 用上 Linux 6.2 内核,预计下放到 22.04 LTS 版本
Linux 6.2 带来了多项内容更新,修复了 AMD 锐龙处理器设备在启用 fTPM 后的运行卡顿问题,还增强了文件系统。
|
6月前
|
Ubuntu Linux
Ubuntu24.04LTS默认采用Linux 6.8内核,实验性版本可通过PPA获得
IT之家提醒,当下的 Ubuntu 23.10 也是一个“短期支持版本”,该版本将在今年 7 月终止支持,而今年 4 月推出的 Ubuntu 24.04 LTS 长期支持版本将获得 5 年的更新支持。
|
8月前
|
Ubuntu Linux UED
Ubuntu和Debian系统与Hat Linux系列的使用比较
所以,如果你想搞一个家用服务器,或者是个人使用,喜欢新鲜事物,那Ubuntu可能是你的最好选择。如果你需要一个在商业环境中经受住考验的系统,那Fedora或CentOS可能更符合你的口味。不过记住,CentOS现在是CentOS Stream,中途换马了,所以如果你是稳定性的极端追求者,可能得考虑一下这一变化。而Debian,则适合那些对稳定性需求极高,不太追求软件版本新旧的用户。
281 26
|
8月前
|
Ubuntu Linux Shell
Linux环境下VSCode快速安装终极指南:debian/ubuntu/linux平台通用
以上就是在Linux环境下安装VSCode的终极指南,抛开繁复的专业词汇,以平易近人的文字、形象生动的比喻让你轻松学会这一过程。别忘了,你的小伙伴VSCode已经在应用菜单里等你了!
2478 23
|
6月前
|
Ubuntu 安全 小程序
linux|ubuntu.v18.10版本即将发布,linux桌面让您动心
如果你使用闭源系统,那永远也就别想了!有了这样的需求,也许最终将linux带到人类大众通用市场的是我们中国!
193 0
|
6月前
|
Web App开发 Ubuntu Linux
又该换Linux版本了!
如果你经常用谷歌搜索,使用终端输入命令,推荐你使用Fedora而不是Ubuntu。 如果你不是一个技术用户或程序员,仍推荐使用Ubuntu,还不动手去试试,别忘了将你的体验留在评论区哦~
|
7月前
|
Linux Docker Windows
windows docker安装报错适用于 Linux 的 Windows 子系统必须更新到最新版本才能继续。可通过运行 “wsl.exe --update” 进行更新。
适用于 Linux 的 Windows 子系统需更新至最新版本(如 wsl.2.4.11.0.x64.msi)以解决 2025 年 Windows 更新后可能出现的兼容性问题。用户可通过运行 “wsl.exe --update” 或访问提供的链接下载升级包进行更新。
2907 0
|
4月前
|
Ubuntu 安全 iOS开发
Nessus Professional 10.10 Auto Installer for Ubuntu 24.04 - Nessus 自动化安装程序
Nessus Professional 10.10 Auto Installer for Ubuntu 24.04 - Nessus 自动化安装程序
342 5
|
4月前
|
NoSQL Ubuntu MongoDB
在Ubuntu 22.04上安装MongoDB 6.0的步骤
这些步骤应该可以在Ubuntu 22.04系统上安装MongoDB 6.0。安装过程中,如果遇到任何问题,可以查阅MongoDB的官方文档或者Ubuntu的相关帮助文档,这些资源通常提供了解决特定问题的详细指导。
481 18