View and hide CentOS operating system version information
During work, you need to check the operating system version or download the corresponding source code package online when compiling and installing the source code. You need to obtain the operating system version information in advance. However, operating system information can be obtained simply by using commands, which is obviously insecure, which brings great risks to our system. This requires us to disguise the operating system information to confuse people who want to attack our system. This will make our system more secure.
There are many commands to view the operating system version information. The following lists some common viewing methods:
1. uname-
[root@localhost~]
#uname-a
Linuxlocalhost.localdomain2.6.32-642.el6.x86_64
#1SMPTueMay1017:27:01UTC2016x86_64x86_64x86_64GNU/Linux
[root@localhost~]
#
2. cat/etc/issue
[root@localhost~]
#cat/etc/issue
CentOSrelease6.8(Final)
Kernel\ronan\m
MageEducationLearningServices
http:
//www
.magedu.com
[root@localhost~]
#
3. lsb_release-a if the command cannot be used, you need to install redhat-lsb ---> yum install-y redhat-lsb.x86_64
[root@localhost~]
#lsb_release-a
LSBVersion::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-noarch
DistributorID:CentOS
Description:CentOSrelease6.8(Final)
Release:6.8
Codename:Final
[root@localhost~]
#
4. cat/etc/redhat-release
[root@localhost~]
#cat/etc/redhat-release
CentOSrelease6.8(Final)
[root@localhost~]
#
The above are several ways to view the operating system information, some display details, some only briefly display the operating system information, work according to the need to use different commands.
The process of using the above command to view the operating system information is actually reading the information in/etc/issue and/etc/redhat-release. Therefore, we only need to modify the operating system information in these two files to achieve our goal.