kramer

察看linux 发行版

好像没有太通用的方法。

看一下/etc/redhat-release。  redhat 系列(包括centos) 会有如下内容

[root@localhost ~]# cat /etc/redhat-release 
CentOS Linux release 7.0.1406 (Core) 

 

看一下/etc/issue。 ubuntu内容如下

root@git-server:~# cat /etc/issue
Ubuntu 14.04 LTS \n \l

 

分类:

技术点:

相关文章: