--Vérifiez le contenu des commandes et des fichiers pour vérifier la version du noyau CentOS Linux ou Linux
/etc/centos-release
$ cat /etc/centos-release
CentOS Linux release 8.1.1911 (Core)
/etc/centos-release-upstream
$ cat /etc/centos-release-upstream
Derived from Red Hat Enterprise Linux 8.1 (Source)
/etc/os-release
$ cat /etc/os-release
NAME="CentOS Linux"
VERSION="8 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="8"
/etc/system-release-cpe
$ cat /etc/system-release-cpe
cpe:/o:centos:centos:8
Les informations de version sont répertoriées dans le fichier ici. Beaucoup sont liés symboliquement.
$ ls -l /etc/ | grep release
-rw-r--r--1 racine racine 38 13 mars 04:15 centos-release
-rw-r--r--1 racine racine 51 13 mars 04:15 centos-release-upstream
lrwxrwxrwx 1 racine racine 21 mars 13 04:15 os-release -> ../usr/lib/os-release
lrwxrwxrwx 1 racine racine 14 mars 13 04:15 redhat-release -> centos-release
lrwxrwxrwx 1 racine racine 14 mars 13 04:15 system-release -> centos-release
-rw-r--r--.1 racine racine 23 mars 13 04:15 system-release-cpe
$ uname -m
x86_64
$ uname -o
GNU/Linux
$ uname -r
4.18.0-147.5.1.el8_1.x86_64
$ uname -s
Linux
$ uname -v
#1 SMP Wed Feb 5 02:00:39 UTC 2020
$ uname -morsv
Linux 4.18.0-147.5.1.el8_1.x86_64 #1 SMP Wed Feb 5 02:00:39 UTC 2020 x86_64 GNU/Linux
$ uname -a
Linux foo.example.com 4.18.0-147.5.1.el8_1.x86_64 #1 SMP Wed Feb 5 02:00:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
$ lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 8.1.1911 (Core)
Release: 8.1.1911
Codename: Core
La commande lsb_release est incluse dans le paquet redhat-lsb-core, donc installez-la avec dnf install redhat-lsb-core si nécessaire.
hostnamectl
$ hostnamectl
Static hostname: foo.example.com
Icon name: computer-vm
Chassis: vm
Machine ID: 11112222333344445555666677778888
Boot ID: ffffeeeeddddccccbbbbaaaa00009999
Virtualization: kvm
Operating System: CentOS Linux 8 (Core)
CPE OS Name: cpe:/o:centos:centos:8
Kernel: Linux 4.18.0-147.5.1.el8_1.x86_64
Architecture: x86-64
Recommended Posts