当前位置: 技术问答>linux和unix
如何判断linux是哪种发行版
来源: 互联网 发布时间:2016-10-06
本文导语: linux下有什么办法判断,当前使用的linux是什么发行版呢?比如如何区分Debian;Slackware... uname -a 也看不出来啊。 | [root@RHEL4_U5 ~]# cat /etc/redhat-release Red Hat Enterprise Linux ES release 4 (Nahant Upd...
linux下有什么办法判断,当前使用的linux是什么发行版呢?比如如何区分Debian;Slackware...
uname -a 也看不出来啊。
uname -a 也看不出来啊。
|
[root@RHEL4_U5 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux ES release 4 (Nahant Update 5)
[root@RHEL4_U5 ~]#
Red Hat Enterprise Linux ES release 4 (Nahant Update 5)
[root@RHEL4_U5 ~]#
|
# cat /etc/issue
|
cat /etc/issue ,我一直用这个命令,个人感觉这事看系统版本最好用的命令了
|
用 cat /proc/version 看看
|
如果是新的发行版,可以用:
[bitman@feb ~]$ lsb_release --help
FSG lsb_release v2.0 prints certain LSB (Linux Standard Base) and
Distribution information.
Usage: lsb_release [OPTION]...
With no OPTION specified defaults to -v.
Options:
-v, --version
Display the version of the LSB specification against which the distribution is compliant.
-i, --id
Display the string id of the distributor.
-d, --description
Display the single line text description of the distribution.
-r, --release
Display the release number of the distribution.
-c, --codename
Display the codename according to the distribution release.
-a, --all
Display all of the above information.
-s, --short
Use short output format for information requested by other options (or version if none).
-h, --help
Display this message.
[bitman@feb ~]$ lsb_release -d
Description: Red Hat Enterprise Linux Server release 5 (Tikanga)
[bitman@feb ~]$ lsb_release --help
FSG lsb_release v2.0 prints certain LSB (Linux Standard Base) and
Distribution information.
Usage: lsb_release [OPTION]...
With no OPTION specified defaults to -v.
Options:
-v, --version
Display the version of the LSB specification against which the distribution is compliant.
-i, --id
Display the string id of the distributor.
-d, --description
Display the single line text description of the distribution.
-r, --release
Display the release number of the distribution.
-c, --codename
Display the codename according to the distribution release.
-a, --all
Display all of the above information.
-s, --short
Use short output format for information requested by other options (or version if none).
-h, --help
Display this message.
[bitman@feb ~]$ lsb_release -d
Description: Red Hat Enterprise Linux Server release 5 (Tikanga)
|
学习中
|
同意5楼!
|
但是/etc/issue是可以用户定义的,而
[root@RHEL4_U5 icons]# cat /etc/redhat-release
Red Hat Enterprise Linux ES release 4 (Nahant Update 5)
是系统定义的哦,oracle安装都是检测这个文件的内容的,如果检测到内容不符合oracle的安装需求,就退出安装
[root@RHEL4_U5 icons]# cat /etc/redhat-release
Red Hat Enterprise Linux ES release 4 (Nahant Update 5)
是系统定义的哦,oracle安装都是检测这个文件的内容的,如果检测到内容不符合oracle的安装需求,就退出安装
|
感觉这个没什么意义,难道你连自己装的什么系统都不知道吗?
而且即使是一个陌生的机器,随便上去看几个目录的结构也能判断出来是哪个版本linux了啊
而且即使是一个陌生的机器,随便上去看几个目录的结构也能判断出来是哪个版本linux了啊
|
cat /etc/issue
居然显示:welcome to s r (l)
显示不出来版本!
居然显示:welcome to s r (l)
显示不出来版本!
|
[frank@www mnt]$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5 (Tikanga)
[frank@www mnt]$
|
来晚了……同楼上……
|
cat /etc/issue
issue美音:['ɪʃju]英音:['iʃju:]
issue的中文翻译
以下结果由译典通提供词典解释
及物动词 vt.
1.
发行;发布
The post office issued the stamps last week.
上星期邮局发行了这些邮票。
2.
发给,配给[O][(+to)],核发
Who issued the travel documents?
谁核发这些旅游证件的?
3.
使流出,放出,排出
不及物动词 vi.
1.
出来[(+forth)]
2.
流出[(+from)]
Lava issued from the volcano.
熔岩从火山口流出来。
3.
由...得出,由...产生[(+from)]
A strange noise issues from the next room.
隔壁房间里传出奇怪的响声。
4.
诞生,传代
His difficulties issue from his lack of knowledge.
他遇到的困难是由缺少知识造成的。
5.
收益,生息
6.
发行,颁布,出版
A new coinage issued.
一种新硬币发行了。
名词 n.
1.
问题;争论;争议[C]
They have published a lot of new books on international issues.
他们已经出版了很多论述国际问题的新书。
2.
发行(物);一次发行量;(报刊)期号[C]
There's an article about Jamaica in this issue.
在这一期里有一篇关于牙买加的文章。
3.
流出;流出物[U]
4.
【律】子女,子嗣[U]
He died without issue.
他身后无子女。
5.
(土地,地产等的)收益[P]
|
cat /etc/issue
|
[root@localhost /]# more /etc/redhat-release
CentOS release 5.3 (Final)
[root@localhost /]#
[root@localhost /]# cat /proc/version
Linux version 2.6.18-128.1.10.el5 (mockbuild@builder16.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-44)) #1 SMP Thu May 7 10:39:21 EDT 2009
[root@localhost /]#
[root@localhost /]# more /etc/issue
CentOS release 5.3 (Final)
Kernel r on an m
[root@localhost /]#
[root@localhost /]# lsb_release -d
Description: CentOS release 5.3 (Final)
[root@localhost /]#