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

來源:互聯網
上載者:User

標籤:作業系統   資訊   網上   release   


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

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

1.uname -a

[[email protected] ~]# uname -aLinux localhost.localdomain 2.6.32-642.el6.x86_64 #1 SMP Tue May 10 17:27:01 UTC 2016 x86_64 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://www.magedu.com[[email protected] ~]#

3.lsb_release -a 如命令不能使用,需要安裝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] ~]#

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

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

本文出自 “11880696” 部落格,請務必保留此出處http://11890696.blog.51cto.com/11880696/1829603

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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.