察看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

 

posted on 2015-04-09 08:55  kramer  阅读(145)  评论(0编辑  收藏  举报

导航