Source From Here
Question
Knowing the exact kernel version or OS version is sometimes necessary while troubleshooting an issue or providing information to the support team. This post will assist you to determine the OS and kernel version of the CentOS or RHEL system you are running.
There are 2 major things to check when it comes to finding the version of any Linux system. They are
1. Check the CentOS/RHEL OS Update Level
The 4 files shown below provides the update version of the CentOS/Redhat OS.
The content of each of the above files from a CentOS 7.4 system is shown below.
The above 4 files are provided by the package centos-release.
You can find out release information by checking the versioning reported the rpm database. For example:
2. Check the Running Kernel version
You can find out which CentOS kernel version and architecture you are using with the uname command. Do “man uname” for details of the uname command. Examples:
Check kernel compile time (uname -v) and compare with known value:
You can also Verify the kernel package using the rpm command. The command would produce an output only if there is any issue with the installed kernel.
Checking CentOS 7 version
Apart from all the above commands, you can also use the command “hostnamectl” to find OS version information in CentOS 7 systems. For example:
Checking the LSB version
Another way to check the centOS version is using the “lsb_release” command. The lsb_release command is provided by the package “redhat-lsb”. This package may not be present by default on the system and you may need to install it first.
Examples of lsb_release command:
Question
Knowing the exact kernel version or OS version is sometimes necessary while troubleshooting an issue or providing information to the support team. This post will assist you to determine the OS and kernel version of the CentOS or RHEL system you are running.
There are 2 major things to check when it comes to finding the version of any Linux system. They are
1. Check the CentOS/RHEL OS Update Level
The 4 files shown below provides the update version of the CentOS/Redhat OS.
The content of each of the above files from a CentOS 7.4 system is shown below.
The above 4 files are provided by the package centos-release.
You can find out release information by checking the versioning reported the rpm database. For example:
2. Check the Running Kernel version
You can find out which CentOS kernel version and architecture you are using with the uname command. Do “man uname” for details of the uname command. Examples:
Check kernel compile time (uname -v) and compare with known value:
You can also Verify the kernel package using the rpm command. The command would produce an output only if there is any issue with the installed kernel.
Checking CentOS 7 version
Apart from all the above commands, you can also use the command “hostnamectl” to find OS version information in CentOS 7 systems. For example:
Checking the LSB version
Another way to check the centOS version is using the “lsb_release” command. The lsb_release command is provided by the package “redhat-lsb”. This package may not be present by default on the system and you may need to install it first.
Examples of lsb_release command:
沒有留言:
張貼留言