一、查看内核版本命令:
1. root@xiarong-desktop:~# cat /proc/version
Linux version 2.6.32-21-generic (buildd@rothera) (gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) ) #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010
2. root@xiarong-desktop:~# uname -r
2.6.32-21-generic
3. root@xiarong-desktop:~# uname -a
Linux xiarong-desktop 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010 i686 GNU/Linux
二、查看linux版本
1、root@xiarong-desktop:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04 LTS
Release: 10.04
Codename: lucid
注:这个命令适用于所有的linux,包括Redhat、SuSE、Debian等发行版。
2、root@xiarong-desktop:~# cat /etc/issue
Ubuntu 10.04 LTS \n \l