【原创】Ubuntu查看系统版本信息和系统位数


【原创】Ubuntu查看系统版本信息和系统位数


查看ubuntu系统版本信息

转载自:http://blog.chinaitlab.com/html/88/1031688-150364.html


方法一:cat /etc/issue
            返回结果:Ubuntu 8.04.1 \n \l


方法二:cat /proc/version
             返回结果:Linux version 2.6.24-21-generic (buildd@palmer) (gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)) #1 SMP Mon Aug 25 17:32:09 UTC 2008


方法三:uname -a
             返回结果:Linux wwt-laptop 2.6.24-21-generic #1 SMP Mon Aug 25 17:32:09 UTC 2008 i686 GNU/Linux


方法四:lsb_release -a
             返回结果:
                            No LSB modules are available.
                            Distributor ID:    Ubuntu
                            Description:    Ubuntu 8.04.1
                            Release:    8.04
                            Codename:    hardy


方法五:cat /etc/lsb-release
             返回结果:
                            DISTRIB_ID=Ubuntu
                            DISTRIB_RELEASE=8.04
                            DISTRIB_CODENAME=hardy
                            DISTRIB_DESCRIPTION="Ubuntu 8.04.1"


查看ubuntu系统版本信息位数

uname -a


uname -m


getconf WORD_BIT                                                                               
WORD_BIT不论在32bit系统还是64bit系统都是32
可以查LONG_BIT,在32bit系统和64bit系统是不一样的。


不过,uname -a就完全可以解决的。


我的虚拟机中查询结果如下:

yang@ubuntu:~$ cat /etc/issue
Ubuntu 12.04.4 LTS \n \l

yang@ubuntu:~$ cat /proc/version
Linux version 3.2.0-61-generic-pae (buildd@batsu) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #92-Ubuntu SMP Tue Apr 1 00:10:04 UTC 2014


yang@ubuntu:~$ uname -a
Linux ubuntu 3.2.0-61-generic-pae #92-Ubuntu SMP Tue Apr 1 00:10:04 UTC 2014 i686 i686 i386 GNU/Linux


yang@ubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 12.04.4 LTS
Release: 12.04
Codename: precise


yang@ubuntu:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.4 LTS"


yang@ubuntu:~$ getconf WORD_BIT  
32


yang@ubuntu:~$ getconf LONG_BIT
32



posted @ 2014-04-26 22:13  GengLUT  阅读(267)  评论(0编辑  收藏  举报