CentOS作業系統版本資訊查看和隱藏

來源:互聯網
上載者:User

CentOS作業系統版本資訊查看和隱藏

工作中需要查看一下作業系統版本,或者是源碼編譯安裝時,到網上下載對應的源碼包,需要提前擷取作業系統版本資訊。然而,作業系統資訊能簡單使用命令擷取,顯然是不安全的,這樣給我們的系統帶來很大的隱患。這就需要我們對作業系統資訊進行一定的偽裝,來迷惑想要攻擊我們系統的人。這樣會使我們的系統更加安全。

查看作業系統版本資訊的命令很多,下面列出一些常用的查看方式:

1.uname -a

[root@localhost~]#uname-aLinuxlocalhost.localdomain2.6.32-642.el6.x86_64#1SMPTueMay1017:27:01UTC2016x86_64x86_64x86_64GNU/Linux[root@localhost~]#

2.cat /etc/issue

[root@localhost~]#cat/etc/issueCentOSrelease6.8(Final)Kernel\ronan\mMageEducationLearningServiceshttp://www.magedu.com[root@localhost~]#

3.lsb_release -a如命令不能使用,需要安裝redhat-lsb--->yum install -y redhat-lsb.x86_64

[root@localhost~]#lsb_release-aLSBVersion::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-noarchDistributorID:CentOSDescription:CentOSrelease6.8(Final)Release:6.8Codename:Final[root@localhost~]#

4.cat /etc/redhat-release

[root@localhost~]#cat/etc/redhat-releaseCentOSrelease6.8(Final)[root@localhost~]#

以上是幾種查看作業系統資訊的方式,有些顯示資訊詳細,有些僅僅簡略顯示作業系統資訊,工作中根據需要使用不同的命令。

在使用上述命令查看作業系統資訊的過程,實際上都是在讀取/etc/issue和/etc/redhat-release中的資訊。所以我們只要對這兩個檔案中的作業系統相關的資訊進行修改,就能達到我們的目的。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.