查看 Linux 版本有很多种方式,这里做一个简单的汇总:
一、查看内核版本
1. uname -a
ubuntu@ubuntu:~$ uname -aLinux ubuntu 5.4.0-1035-raspi #38-Ubuntu SMP PREEMPT Tue Apr 20 21:37:03 UTC aarch64 aarch64 aarch64 GNU/Linux
2. cat /proc/version
ubuntu@ubuntu:~$ cat /proc/versionLinux version 5.4.0-1035-raspi (buildd@bos02-arm64-009) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #38-Ubuntu SMP PREEMPT Tue Apr 20 21:37:03 UTC
二、查看发行版版本
1. cat /etc/issue
ubuntu@ubuntu:~$ cat /etc/issueUbuntu 20.04.2 LTS \n \l
2. lsb_release -a
ubuntu@ubuntu:~$ lsb_release -aNo LSB modules are available.Distributor ID:UbuntuDescription:Ubuntu 20.04.2 LTSRelease:20.04Codename:focal
如果觉得《Linux 查看内核和发行版版本》对你有帮助,请点赞、收藏,并留下你的观点哦!