Commands and files to check the version of CentOS Linux

Overview

--Check the contents of commands and files to check the version of CentOS Linux or Linux kernel

/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

Files with release under / etc /

The version information is listed in the file around here. Many are symbolically linked.

$ ls -l /etc/ | grep release
-rw-r--r--1 root root 38 March 13 04:15 centos-release
-rw-r--r--1 root root 51 March 13 04:15 centos-release-upstream
lrwxrwxrwx 1 root root 21 March 13 04:15 os-release -> ../usr/lib/os-release
lrwxrwxrwx 1 root root 14 March 13 04:15 redhat-release -> centos-release
lrwxrwxrwx 1 root root 14 March 13 04:15 system-release -> centos-release
-rw-r--r--.1 root root 23 March 13 04:15 system-release-cpe

uname: kernel information

$ 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: LSB (Linux Standard Base) information

$ 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

The lsb_release command is included in the redhat-lsb-core package, so install it with dnf install redhat-lsb-core if necessary.

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

Reference material

-Red Hat Enterprise Linux Release Date and List of Included Kernels -Red Hat Customer Portal

Recommended Posts

Commands and files to check the version of CentOS Linux
Check the type and version of your Linux distribution
How to check the version of Django
Check the type and version of your Linux distribution
Commands and files to check the version of CentOS Linux
Check OpenSSL version of python 2.6
How to check Linux OS version
The first artificial intelligence. How to check the version of Tensorflow installed.
[Linux] How to subdivide files and folders
[Linux] Summary of middleware version confirmation commands
[linux] Split files to the specified size
[Linux] Learn the basics of shell commands
[2020July] Check the UDID of the iPad on Linux
Specify the start and end positions of files to be included with qiitap
Linux commands to remember
Check Linux kernel version
Linux: files and directories
Easy way to check the source of Python modules
Beginners! Basic Linux commands and how to use them!
Open Chrome version of LINE from the command line [Linux]
How to check the Java version used by Maven
Comparison of Windows Server and Free Linux to Commercial Linux
Explanation of package tools and commands for Linux OS
Understand the attributes of Linux files (ls -l command)
[Linux] I learned LPIC lv1 in 10 days and tried to understand the mechanism of Linux.
I want to use Linux commands at the command prompt! Use Linux commands at the command prompt instead of Git Bash
[Linux] [C / C ++] How to get the return address value of a function and the function name of the caller
Studying Linux commands and frustration
Put the latest version of Python on linux (Debian) on Chromebook
[Golang] Command to check the supported GOOS and GOARCH in a list (Check the supported platforms of the build)
Linux (about files and directories)
About LINUX files and processes
[Linux] Compress folders and transfer files from remote to local
Check the memory status of the server with the Linux free command
I made a function to check the model of DCGAN
Check the operating status of the server with the Linux top command
Hook to the first import of the module and print the module path
Check OpenSSL version of python 2.6
A rough summary of the differences between Windows and Linux
I want to know the features of Python and pip
After all, the story of returning from Linux to Windows
Install the latest version of Git on your Linux server
A story about porting the code of "Try and understand how Linux works" to Rust
The impact of Linux page cache attack countermeasures is large and is expected to be prolonged [Translation]
The story that the version of python 3.7.7 was not adapted to Heroku
[Linux] I tried to summarize the command of resource confirmation system
Suspend Thread on Linux (corrected version at the bottom of the article)
Correct the version Conflict of pip and execute the library installation normally.
[Linux] [C / C ++] Operation check memo of fork, thread and thread local variables
I want to read the html version of "OpenCV-Python Tutorials" OpenCV 3.1 version
[EC2] How to install chrome and the contents of each command
How to check the memory size of a variable in Python
[Introduction to Python] I compared the naming conventions of C # and Python.
[Python] How to get the first and last days of the month
How to set up and use OMC Log Analytics --Linux version -
How to check the memory size of a dictionary in Python
[TensorFlow 2] How to check the contents of Tensor in graph mode
[Linux] How to disable the automatic update of the /etc/resolv.conf file (AmazonLinux2)
How to output the output result of the Linux man command to a file
Settings to be made when starting up the linux server centos7
Check the memory protection of linux kerne with the code for ARM
I summarized how to change the boot parameters of GRUB and GRUB2
A command to easily check the speed of the network on the console