Linux-システム管理

Linuxシステムバージョンを表示                                                                   

CentOSシステム

#centos7Viewコマンド
[root @ localhost〜] #cat / etc / os-release 

#Centos6 / 7一般コマンド
[root @ localhost〜] #cat / etc / redhat-release 
[root @ localhost〜] #cat / etc / redhat- release | sed -r's /.*([0-9] +)\ .. * / \ 1 / ' 

#centos6 / 7一般コマンド
[root @ localhost〜] 
#cat / etc / centos-release [root @ localhost〜] #cat / etc / centos-release | sed -r's /.*([0-9] +)\ .. * / \ 1 / ' 

#centos6 / 7一般コマンド
[root @ localhost〜] #rpm -q centos -release 
[root @ localhost〜] #rpm -q centos-release | cut -d- -f3 

#ファイル/ etc / redhat-releaseはradhatまたはcentosに存在します。[コマンドcat / etc / redhat-release]

Ubuntuシステム

ubuntu @ VM-0-9-ubuntu:〜$ lsb_release -a 
 
ubuntu @ VM-0-9-ubuntu:〜$ cat / etc / os-release 
 
ubuntu @ VM-0-9-ubuntu:〜$ cat / etc / issue 
ubuntu @ VM-0-9-ubuntu:〜$ less / etc / issue 

#ubuntu存在:/ etc / lsb-releaseこれらの文件【命令cat / etc / lsb-release】

Linuxカーネルバージョンを表示                                                                   

[root @ localhost〜] #cat / proc / version 

[root @ localhost〜] #uname -a

  

  

 

  

 

 

  

 

おすすめ

転載: blog.csdn.net/qq_45533800/article/details/112529244