Chinaunix

标题: 查看Linux版本 [打印本页]

作者: gjfb68    时间: 2008-10-22 14:39
标题: 查看Linux版本

1.cat /etc/redhat-release
Fedora Core release 5 (Bordeaux)
               
2.cat /etc/issue
Fedora Core release 5 (Bordeaux)
Kernel \r on an \m
                3.内核的版本信息在这里:
cat /proc/version
4.lsb_release -a
LSB Version: 1.3
Distributor ID: RedHatEnterpriseAS
Description: Red Hat Enterprise Linux AS release 4 (Nahant Update 1)
Release: 4
Codename: NahantUpdate1
注意:这个命令适用于所有的linux,包括Redhat、SuSE、Debian等发行版。
5.cat /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 1)
这种方式下可以直接看到具体的版本号,比如 AS4 Update 1
6.rpm -q redhat-release
redhat-release-4AS-2.4
注意:第1,5,6两种方法只对Redhat Linux有效
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/78078/showart_1332312.html




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2