Centos查看系统版本「建议收藏」
生活随笔
收集整理的這篇文章主要介紹了
Centos查看系统版本「建议收藏」
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1. 查看已經安裝的CentOS版本信息
CentOS的版本號信息一般存放在配置文件當中,在CentOS中,與其版本相關的配置文件中都有centos關鍵字,該文件一般存放在/etc/目錄下,所以說我們可以直接在該文件夾下搜索相關的文件。
其中存放其版本配置信息的文件為“centos-release”,翻譯過來就是“CentOS的發行版”,所以說我們可以在這里查看CentOS相應的版本信息。upstream,上游的意思,centos是由RHEL衍生而來。
ll /etc/*centos*
查看的結果:
[root@localhost ~]# ll /etc/*centos*
-rw-r--r--. 1 root root 37 10月 23 2020 /etc/centos-release
-rw-r--r--. 1 root root 51 10月 23 2020 /etc/centos-release-upstream
[root@localhost ~]# cat /etc/centos-release
CentOS Linux release 7.9.2009 (Core)
[root@localhost ~]# cat /etc/centos-release-upstream
Derived from Red Hat Enterprise Linux 7.8 (Source)
其他方式:
- cat /etc/redhat-release 查看版本
[root@localhost ~]# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
2. cat /proc/version
[root@localhost ~]# cat /proc/version
Linux version 3.10.0-1160.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) ) #1 SMP Mon Oct 19 16:18:59 UTC 2020
proc 為process的縮寫,里面存放與內核相關的文件。
我們可以看到該系統使用的是Linux 3.10.0 內核的64為操作系統。GCC 為GUN 編譯器集合,采用4.8.5版本。
2. 查看內核版本
uname -a 查看內核版本,顯示如下
[root@localhost ~]# uname -a
Linux localhost.localdomain 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Linux 版本 3.10.0-1160.el7.x86_64
uname -r 查看內核版本,顯示如下:
[root@localhost ~]# uname -r
3.10.0-1160.el7.x86_64
分析結果:Linux 版本 3.10.0-1160.el7.x86_64
3. 查看操作系統位數
查看指令為:
getconf LONG_BIT
??顯示的結果為:
64
總結
以上是生活随笔為你收集整理的Centos查看系统版本「建议收藏」的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: p30怎么开超广角
- 下一篇: power query是什么(Power