一、查看Linux内核版本命令(两种方法):
1、cat /proc/version
[root@pythontab.com home]# cat /proc/version
Linux version 2.6.32-573.22.1.el6.i686 (mockbuild@c6b8.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC) ) #1 SMP Wed Mar 23 00:37:12 UTC 2014
2、uname -a
[root@pythontab.com home]# uname -a
Linux pythontab.com 2.6.32-573.22.1.el6.i686 #1 SMP Wed Mar 23 00:37:12 UTC 2014 i686 i686 i386 GNU/Linux
二、查看Linux系统版本的命令(3种方法):
1、lsb_release -a,即可列出所有版本信息:
[root@pythontab.com home]# lsb_release -a
LSB Version: :base-4.0-ia32:base-4.0-noarch:core-4.0-ia32:core-4.0-noarch:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.5 (Final)
Release: 6.5
Codename: Final
这个命令适用于所有的Linux发行版,包括RedHat、SUSE、CentOS、Debian…等发行版。
2、cat /etc/redhat-release,这种方法只适合Redhat系的Linux:
[root@pythontab.com home]# cat /etc/redhat-release
CentOS release 6.5 (Final)
3、cat /etc/issue,此命令也适用于所有的Linux发行版。
[root@pythontab.com home]# cat /etc/issue
CentOS release 6.5 (Final)
Kernel \r on an \m
原文来源:https://m.pythontab.com/article/1312
共同学习,写下你的评论
评论加载中...
作者其他优质文章