基于ubuntu18.04版本,分享不同方法在root下查看系统信息。
1. uname -a # 常用,内核版本、版本号、架构
Linux ubuntu 5.4.0-65-generic #73~18.04.1-Ubuntu SMP Tue Jan 19 09:02:24 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
2.uname -r 内核
5.4.0-65-generic
3.cat /etc/issue
Ubuntu 18.04.4 LTS
l
4.lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic
5.cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.4 LTS"
6.cat /proc/version
Linux version 5.4.0-65-generic (buildd@lgw01-amd64-048) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #73~18.04.1-Ubuntu SMP Tue Jan 19 09:02:24 UTC 2021