Work needs to look at the operating system version, or the source code to compile the installation, to download the corresponding source package, you need to obtain the operating system version information in advance. However, the operating system information can be easily used to obtain the command, it is obviously unsafe, so that the system brings great hidden trouble. This requires a certain disguise of the operating system information to confuse those who want to attack our system. This will make our system more secure.
There are many commands to view the operating system version information, and here are some common ways to view them:
1.uname-a
[Email protected] ~]# uname-alinux localhost.localdomain 2.6.32-642.el6.x86_64 #1 SMP Tue may 17:27:01 UTC x86_6 4 x86_64 x86_64 gnu/linux[[email protected] ~]#
2.cat/etc/issue
[Email protected] ~]# Cat/etc/issuecentos release 6.8 (Final) Kernel \ R on an \mmage education learning SERVICESHTTP://WW W.magedu.com[[email protected] ~]#
3.lsb_release-a if the command is not available, you need to install REDHAT-LSB--->yum install-y redhat-lsb.x86_64
[Email protected] ~]# lsb_release-alsb Version:: Base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch: Graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarchdistributor id:centosdescription: CentOS Release 6.8 (Final) release:6.8codename:final[[email protected] ~]#
4.cat/etc/redhat-release
[Email protected] ~]# Cat/etc/redhat-releasecentos release 6.8 (Final) [[email protected] ~]#
These are several ways to view the operating system information, some display information in detail, some just briefly display operating system information, work according to the need to use different commands.
The process of viewing operating system information using the above command is actually reading the information in/etc/issue and/etc/redhat-release. So all we have to do is modify the information about the operating system in these two files to achieve our goal.
This article is from the "11880696" blog, please be sure to keep this source http://11890696.blog.51cto.com/11880696/1829603
CentOS OS version information view and hide