Ubuntu 查看 CPU 架构、系统信息、内核版本、版本代号等相干信息有许多方式,本文先容几种常用的命令。
x86 架构与 ARM 架构的 CPU 架构差别,假如回显为 aarch64 表示为 ARM 架构,假如回显为 x86_64 表示为 x86 架构,参考《CPU 架构(x86/ARM)简介》这篇文章。
uname
- root@k8s-master:~# uname
- Linux
- root@k8s-master:~# uname -a
- Linux k8s-master 5.15.0-1027-raspi #29-Ubuntu SMP PREEMPT Mon Apr 3 10:12:21 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux
- root@k8s-master:~# uname -r
- 5.15.0-1027-raspi
- root@k8s-master:~# uname -m
- aarch64
复制代码 arch
- root@k8s-master:~# arch
- aarch64
复制代码 Ubuntu 底子版本号由日期构成,好比 Ubuntu 22.04 表示 2022 年 4 月份发布的版本,在选择 Ubuntu 版本的时间,最好选择 LTS(Long Term Support) 版本,而且每个 Ubuntu 版本都有一个代号,这个代号会在安装软件时用到。
Ubuntu LTS 各版本代号如下:
- Ubuntu 12.04 (LTS)代号为 precise
- Ubuntu 14.04 (LTS)代号为 trusty
- Ubuntu 16.04 (LTS)代号为 xenial
- Ubuntu 18.04 (LTS)代号为 bionic
- Ubuntu 20.04 (LTS)代号为 focal
- Ubuntu 22.04 (LTS)代号为 jammy
- Ubuntu 24.04 (LTS)代号为 noble
lsb_release
- root@k8s-master:~# lsb_release -a
- No LSB modules are available.
- Distributor ID: Ubuntu
- Description: Ubuntu 22.04.2 LTS
- Release: 22.04
- Codename: jammy
-
- root@k8s-master:~# lsb_release -c
- Codename: jammy
复制代码 lscpu
- root@k8s-master:~# lscpu
- Architecture: aarch64
- CPU op-mode(s): 32-bit, 64-bit
- Byte Order: Little Endian
- CPU(s): 4
- On-line CPU(s) list: 0-3
- Vendor ID: ARM
- Model name: Cortex-A72
- Model: 3
- Thread(s) per core: 1
- Core(s) per cluster: 4
- Socket(s): -
- Cluster(s): 1
- Stepping: r0p3
- CPU max MHz: 1800.0000
- CPU min MHz: 600.0000
- BogoMIPS: 108.00
- Flags: fp asimd evtstrm crc32 cpuid
- Caches (sum of all):
- L1d: 128 KiB (4 instances)
- L1i: 192 KiB (4 instances)
- L2: 1 MiB (1 instance)
- Vulnerabilities:
- Itlb multihit: Not affected
- L1tf: Not affected
- Mds: Not affected
- Meltdown: Not affected
- Mmio stale data: Not affected
- Retbleed: Not affected
- Spec store bypass: Vulnerable
- Spectre v1: Mitigation; __user pointer sanitization
- Spectre v2: Vulnerable
- Srbds: Not affected
- Tsx async abort: Not affected
复制代码 /proc/version
- root@k8s-master:~# cat /proc/version
- Linux version 5.15.0-1027-raspi (buildd@bos02-arm64-011) (gcc (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38) #29-Ubuntu SMP PREEMPT Mon Apr 3 10:12:21 UTC 2023
复制代码 免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。 |