1.cat /proc/version
[root@master2 ~]# cat /proc/version
Linux version 3.10.0-1160.76.1.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) ) #1 SMP Wed Aug 10 16:21:17 UTC 2022
2.uname -a
[root@master2 ~]# uname -a
Linux master2 3.10.0-1160.76.1.el7.x86_64 #1 SMP Wed Aug 10 16:21:17 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
[root@master2 ~]# uname -r
3.10.0-1160.76.1.el7.x86_64
3.查看release文件
[root@master2 ~]# ll /etc/ | grep release
-rw-r–r-- 1 root root 37 Nov 23 2020 centos-release
-rw-r–r-- 1 root root 51 Nov 23 2020 centos-release-upstream
lrwxrwxrwx 1 root root 21 Sep 14 2022 os-release -> …/usr/lib/os-release
lrwxrwxrwx 1 root root 14 Sep 14 2022 redhat-release -> centos-release
lrwxrwxrwx 1 root root 14 Sep 14 2022 system-release -> centos-release
-rw-r–r-- 1 root root 23 Nov 23 2020 system-release-cpe
cat /etc/centos-release
[root@master2 ~]# cat /etc/centos-release
CentOS Linux release 7.9.2009 (Core)
cat /etc/os-release
[root@master2 ~]# cat /etc/os-release
NAME=“CentOS Linux”
VERSION=“7 (Core)”
ID=“centos”
ID_LIKE=“rhel fedora”
VERSION_ID=“7”
PRETTY_NAME=“CentOS Linux 7 (Core)”
ANSI_COLOR=“0;31”
CPE_NAME=“cpe:/o:centos:centos:7”
HOME_URL=“https://www.centos.org/”
BUG_REPORT_URL=“https://bugs.centos.org/”
CENTOS_MANTISBT_PROJECT=“CentOS-7”
CENTOS_MANTISBT_PROJECT_VERSION=“7”
REDHAT_SUPPORT_PRODUCT=“centos”
REDHAT_SUPPORT_PRODUCT_VERSION=“7”
4.dmesg
dmesg | grep “Linux”
(展示信息display message 或驱动程序信息driver message)是大多数类 Unix 操作系统上的一个命令,用于打印内核的消息缓冲区的信息)
5.其他
yum info nano
yum repolist
dnf info nano
rpm -q nano
apt-cache policy nano