参看:Linux(Ubuntu)系统查看版本及内核信息
查看ubuntu版本号
方法一: cat /etc/issue
root@ubuntu:~# cat /etc/issueUbuntu 12.04 LTS \n \l
方法二: sudo lsb_release -a
root@ubuntu:~# sudo lsb_release -aNo LSB modules are available.Distributor ID:UbuntuDescription:Ubuntu 12.04 LTSRelease:12.04Codename:precise
方法三: cat /etc/lsb-release
root@ubuntu:~# cat /etc/lsb-releaseDISTRIB_ID=UbuntuDISTRIB_RELEASE=12.04DISTRIB_CODENAME=preciseDISTRIB_DESCRIPTION="Ubuntu 12.04 LTS"
方法四: cat /proc/version
root@ubuntu:~# cat /proc/version Linux version 3.2.0-23-generic-pae (buildd@palmer) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu4) ) #36-Ubuntu SMP Tue Apr 10 22:19:09 UTC
方法五: uname -a
root@ubuntu:~# uname -aLinux ubuntu 3.2.0-23-generic-pae #36-Ubuntu SMP Tue Apr 10 22:19:09 UTC i686 i686 i386 GNU/Linux
方法六:仅仅查看内核版本 uname -r
root@ubuntu:~# uname -r3.2.0-23-generic-pae
扩展:如何判断Linux是32位还是64位
参看:MQTT再学习 -- 搭建MQTT服务器及测试