您的位置:首页 > 数据库 > Oracle

Linux学习总结(十一)—— Linux常用命令:版本信息查看(RedHat、CentOS、Debian、Ubuntu、Fedora、Oracle)

2017-04-27 15:55 1266 查看
这篇文章收集了CentOS、Oracle、RedHat等系统查看发行版本、内核版本、位数的方法,欢迎补充。

系统发行版本--内核版本、位数
RedHatcat /etc/issuecat /etc/redhat-releaselsb_release -a
CentOScat /etc/issuecat /etc/centos-releasecat /proc/version
Debiancat /etc/issuecat /etc/debian_versioncat /proc/version
Ubuntucat /etc/issuecat /etc/lsb_releasecat /proc/version
Oraclecat /etc/issuecat /etc/oracle-releaselsb_release -a

RedHat

查看系统发行版本

[root@getlnx05 ~]# cat /etc/issue
Red Hat Enterprise Linux Server release 5.7 (Tikanga)
Kernel \r on an \m

通过
cat /etc/redhat-release
也查到看到相关的信息。

查看系统内核版本、位数

[root@getlnx05 ~]# lsb_release -a
LSB Version:    :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
Distributor ID: RedHatEnterpriseServer
Description:    Red Hat Enterprise Linux Server release 5.7 (Tikanga)
Release:        5.7
Codename:      Tikanga

LSB Version
项显示的是系统的内核版本,其中
amd64
表示系统是64位的。

CentOS

查看系统发行版本 cat /etc/issue

[chenyurong@localhost local]$ cat /etc/issue
CentOS release 6.5 (Final)
Kernel \r on an \m

通过
cat /etc/centos-release
也可以查询到一样的信息。

查看系统内核版本、位数 more /proc/version

[chenyurong@localhost local]$ cat /proc/version
Linux version 2.6.32-431.el6.x86_64 (mockbuild@c6b8.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) ) #1 SMP Fri Nov 22 03:15:09 UTC 2013

Linux version 2.6.32-431.el6.x86_64
显示了Linux的版本,
x86_64
显示了是64位的系统。通过
uname -r
也可以查到相关信息。

Oracle Linux

查看系统发行版本

[root@DB-Server ~]# cat /etc/issue
Oracle Linux Server release 5.7
Kernel \r on an \m

通过
cat /etc/oracle-release
也可以查询到相关信息。

查看系统内核版本、位数

[root@DB-Server ~]# lsb_release -a
LSB Version:    :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
Distributor ID: EnterpriseEnterpriseServer
Description:    Enterprise Linux Enterprise Linux Server release 5.7 (Carthage)
Release:        5.7
Codename:      Carthage

LSB Version
显示的是系统的内核版本,其中
amd64
表示系统是64位的。

所有命令适用范围总结

查看系统发行版本

命令适用范围
lsb_release -a所有Linux发行版
cat /etc/redhat-releaseRedHat系Linux
cat /etc/issue所有Linux发行版

查看系统内核位数

命令适用范围
uname -a、uname -r所有Linux发行版
cat /proc/version所有Linux发行版

参考资料

http://www.cnblogs.com/kerrycode/p/4315900.html

http://www.ha97.com/2987.html

VIP - http://blog.csdn.net/yulei_qq/article/details/53304995
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐