ubuntu命令查詢版本和內核版本
1.查看ubuntu版本號:
方法一:
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"
2.查看內核版本號:
方法四:
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
目錄(?)[+]
1.查看ubuntu版本號:
方法一:
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"
2.查看內核版本號:
方法四:
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