微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Ubuntu16.10下查看linux版本,内核版本,系统位数,gcc版本

Ubuntu下查看linux版本,内核版本,系统位数,gcc版本

1. 查看linux版本

leblancs@leblancs-virtual-machine:~$ cat /etc/issue
Ubuntu 16.10 \n \l

leblancs@leblancs-virtual-machine:~$


2. 查看内核版本
1)

leblancs@leblancs-virtual-machine:~$ cat /proc/version
Linux version 4.8.0-28-generic (buildd@lgw01-16) (gcc version 6.2.0 20161005 (Ubuntu 6.2.0-5ubuntu12) ) #30-Ubuntu SMP Fri Nov 11 14:03:52 UTC 2016
leblancs@leblancs-virtual-machine:~$

2) uname命令

leblancs@leblancs-virtual-machine:~$ uname -a
Linux leblancs-virtual-machine 4.8.0-28-generic #30-Ubuntu SMP Fri Nov 11 14:03:52 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
leblancs@leblancs-virtual-machine:~$

3)

leblancs@leblancs-virtual-machine:~$ uname --help
Usage: uname [OPTION]...
Print certain system information.  With no OPTION,same as -s.

  -a,--all                print all information,in the following order,except omit -p and -i if unkNown:
  -s,--kernel-name        print the kernel name
  -n,--nodename           print the network node hostname
  -r,--kernel-release     print the kernel release
  -v,--kernel-version     print the kernel version
  -m,--machine            print the machine hardware name
  -p,--processor          print the processor type (non-portable)
  -i,--hardware-platform  print the hardware platform (non-portable)
  -o,--operating-system   print the operating system
      --help     display this help and exit
      --version  output version information and exit

GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
Full documentation at: <http://www.gnu.org/software/coreutils/uname>
or available locally via: info '(coreutils) uname invocation'
leblancs@leblancs-virtual-machine:~$



3.查看系统位数
1)

leblancs@leblancs-virtual-machine:~$ getconf WORD_BIT
32
leblancs@leblancs-virtual-machine:~$ getconf LONG_BIT
64
leblancs@leblancs-virtual-machine:~$

2)

leblancs@leblancs-virtual-machine:~$ file /bin/bash
/bin/bash: ELF 64-bit LSB executable,x86-64,version 1 (SYSV),dynamically linked,interpreter /lib64/ld-linux-x86-64.so.2,for GNU/Linux 2.6.32,BuildID[sha1]=6587b60b0a57e1a0f83f7523a658e0bf329fdb5f,stripped
leblancs@leblancs-virtual-machine:~$


4. 查看gcc版本

leblancs@leblancs-virtual-machine:~$ gcc --version
gcc (Ubuntu 6.2.0-5ubuntu12) 6.2.0 20161005
copyright (C) 2016 Free Software Foundation,Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or fitness FOR A PARTIculaR PURPOSE.

leblancs@leblancs-virtual-machine:~$

原文地址:https://www.jb51.cc/ubuntu/355604.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐