方法一:
cat /etc/issue
返回结果:
Ubuntu 6.06.2 LTS \n \l
方法二:
sudo lsb_release -a
返回结果:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 6.06.2 LTS
Release: 6.06
Codename: dapper
方法三:
cat /etc/lsb-release
返回结果:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=6.06
DISTRIB_CODENAME=dapper
DISTRIB_DESCRIPTION="Ubuntu 6.06.2 LTS"
查看linux版本:
方法四:
cat /proc/version
返回结果:
Linux version 2.6.15-51-386 (buildd@palmer) (gcc version 4.0.3 (Ubuntu 4.0.3-1ubuntu5)) #1 PREEMPT Tue Oct 23 21:42:16 UTC 2007
方法五:
uname -a
返回结果:
Linux jpsiteserver 2.6.15-51-386 #1 PREEMPT Tue Oct 23 21:42:16 UTC 2007 i686 GNU/Linux
方法六:仅仅查看内核版本
uname -r
返回结果:
2.6.15-51-386
本文转自夏雪冬日博客园博客,原文链接:http://www.cnblogs.com/heyonggang/archive/2012/12/28/2836786.html,如需转载请自行联系原作者