查看linux系统的版本

1. 查看内核版本命令:

1) [root@SOR_SYS ~]# cat /proc/version
  Linux version 2.6.18-238.el5 (mockbuild@x86-012.build.bos.redhat.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-50)) #1 SMP Sun Dec 19 14:22:44 EST 2010
2)[root@SOR_SYS ~]# uname -r
  2.6.18-238.el5

3)[root@SOR_SYS ~]# uname -a
  Linux SOR_SYS.99bill.com 2.6.18-238.el5 #1 SMP Sun Dec 19 14:22:44 EST 2010 x86_64 x86_64 x86_64 GNU/Linux

2. 查看linux OS 版本:

1) 登录到服务器执行 lsb_release -a 

[root@SOR_SYS ~]# 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: RedHatEnterpriseAS
  Description:    Red Hat Enterprise Linux AS release 4 (Nahant Update 4)
  Release:        4
  Codename:       NahantUpdate4
注:这个命令适用于所有的linux,包括Redhat、SuSE、Debian等发行版。

posted on 2014-03-31 12:27  babyblue  阅读(519)  评论(0编辑  收藏  举报