方法一:
cat /etc/issue
返回结果:
Ubuntu 14.04.2 LTS l
方法二:
sudo lsb_release -a
返回结果:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.2 LTS
Release: 14.04
Codename: trusty
方法三:
cat /etc/lsb-release
返回结果:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.2 LTS"
查看linux版本:
方法四:
cat /proc/version
返回结果:
Linux version 3.13.0-32-generic (buildd@roseapple) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #57-Ubuntu SMP Tue Jul 15 03:51:12 UTC 2014
方法五:
uname -a
返回结果:
Linux LI 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:12 UTC 2014 i686 athlon i686 GNU/Linux
方法六:仅仅查看内核版本
uname -r
返回结果:
3.13.0-32-generic