查看Linux版本信息【需要重新编辑】
2017-04-13 19:16
211 查看
如何查看Linux系统使用的版本信息呢?
下面这篇文章收集、整理了一些常见的查看Linux系统版本的方法。由于手头只有OracleLinux、CentosLinux、RedhatLinux三个版本Linux,所以像Debian、Ubuntu之类的Linux系统,下面方法在这些版本都没测试过。
1:more/etc/issue命令查看
1.1OracleLinux
1.2CentosLinux
1.3RedHatLinux
2:lsb_release-a命令查看
2.1OracleLinux
2.2CentosLinux
2.3RedHatLinux
3:cat/etc/redhat-release命令查看
这个命令应该只有部分Linux可以查看,不是所有版本Linux都可以使用该命令
3.1OracleLinux
3.2CentosLinux
3.3RedHatLinux
4rpm-qredhat-release命令查看,只适用于RedhatLinux
参考博文:http://www.cnblogs.com/kerrycode/p/4315900.html
下面这篇文章收集、整理了一些常见的查看Linux系统版本的方法。由于手头只有OracleLinux、CentosLinux、RedhatLinux三个版本Linux,所以像Debian、Ubuntu之类的Linux系统,下面方法在这些版本都没测试过。
1:more/etc/issue命令查看
1.1OracleLinux
[root@DB-Server~]#more/etc/issue
OracleLinuxServerrelease5.7
Kernel\ronan\m
1.2CentosLinux
[root@Centos2~]#more/etc/issue
CentOSrelease6.4(Final)
Kernel\ronan\m
1.3RedHatLinux
[root@getlnx05~]#more/etc/issue
RedHatEnterpriseLinuxServerrelease5.7(Tikanga)
Kernel\ronan\m
2:lsb_release-a命令查看
2.1OracleLinux
[root@DB-Server~]#lsb_release-a
LSBVersion::core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch
DistributorID:EnterpriseEnterpriseServer
Description:EnterpriseLinuxEnterpriseLinuxServerrelease5.7(Carthage)
Release:5.7
Codename:Carthage
2.2CentosLinux
[root@Centos2~]#lsb_release-a
LSBVersion::base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
DistributorID:CentOS
Description:CentOSrelease6.4(Final)
Release:6.4
Codename:Final
2.3RedHatLinux
[root@getlnx05~]#lsb_release-a
LSBVersion::core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch
DistributorID:RedHatEnterpriseServer
Description:RedHatEnterpriseLinuxServerrelease5.7(Tikanga)
Release:5.7
Codename:Tikanga
3:cat/etc/redhat-release命令查看
这个命令应该只有部分Linux可以查看,不是所有版本Linux都可以使用该命令
3.1OracleLinux
[root@DB-Server~]#cat/etc/redhat-release
RedHatEnterpriseLinuxServerrelease5.7(Tikanga)
[root@DB-Serveretc]#cat/etc/*release
EnterpriseLinuxEnterpriseLinuxServerrelease5.7(Carthage)
OracleLinuxServerrelease5.7
RedHatEnterpriseLinuxServerrelease5.7(Tikanga)
[root@DB-Serveretc]#ls/etc/*lease
/etc/enterprise-release/etc/oracle-release/etc/redhat-release
[root@DB-Serveretc]#
3.2CentosLinux
[root@Centos2~]#cat/etc/redhat-release
CentOSrelease6.4(Final)
[root@Centos2~]#cat/etc/*release
CentOSrelease6.4(Final)
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
CentOSrelease6.4(Final)
CentOSrelease6.4(Final)
[root@Centos2~]#ls/etc/*release
/etc/centos-release/etc/lsb-release/etc/redhat-release/etc/system-release
[root@Centos2~]#
3.3RedHatLinux
[root@getlnx05~]#cat/etc/redhat-release
RedHatEnterpriseLinuxServerrelease5.7(Tikanga)
[root@getlnx05~]#cat/etc/*release
RedHatEnterpriseLinuxServerrelease5.7(Tikanga)
[root@getlnx05~]#ls/etc/*release
/etc/redhat-release
[root@getlnx05~]#
4rpm-qredhat-release命令查看,只适用于RedhatLinux
[root@getlnx05~]#rpm-qredhat-release
redhat-release-5Server-5.7.0.3
参考博文:http://www.cnblogs.com/kerrycode/p/4315900.html
相关文章推荐
- 几种查看linux版本信息的方法
- 几种查看linux版本信息的方法
- linux下查看软件的版本信息和安装目录
- linux,apache,php,mysql常用的查看版本信息的方法
- 查看linux版本信息
- 查看各种Linux系统版本信息的Shell命令
- Linux 查看版本信息
- 几种查看Linux版本信息的方法:
- 查看 Linux 版本信息的几个命令
- 几种查看linux版本信息的方法
- 查看weblogic oracle aix linux apache 的版本信息
- 查看Linux系统版本信息 (转载)
- 在linux中查看版本和内存、cpu、硬盘等信息
- 下面介绍几种查看linux版本信息的方法
- 查看linux内核信息及版本信息
- 如何查看linux发行版版本信息
- 查看LINUX 版本信息命令
- 命令查看linux系统发行版本信息
- 查看Linux版本信息
- 查看linux的版本信息,位数,cpu信息