Linux系統查看系統版本命令

如下操做在centos系統上實現,有些方式可能只適用centos/redhat版本系統node

  1. uname -a |uname -r查看內核版本信息
[root@node1 ~]# uname -a
Linux node1 2.6.32-573.el6.x86_64 #1 SMP Thu Jul 23 15:44:03 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

[root@node1 ~]# uname -r
2.6.32-573.el6.x86_64
  1. cat /proc/version 查看內核版本gcc版本
[root@node1 ~]# cat /proc/version
Linux version 2.6.32-573.el6.x86_64 (mockbuild@c6b9.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-16) (GCC) ) #1 SMP Thu Jul 23 15:44:03 UTC 2015
  1. lsb_release -a 列出全部版本信息,查看系統發行版本信息,centos版本若是沒有此命令能夠執行yum install lsb安裝
[root@node1 ~]# lsb_release  -a
LSB Version:    :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description:    CentOS release 6.7 (Final)
Release:        6.7
Codename:       Final
  1. cat /etc/issue 查看系統版本
[root@node1 ~]# cat /etc/issue
CentOS release 6.7 (Final)
Kernel \r on an \m
  1. centos系統執行cat /etc/redhat-release 查看系統版本信息
[root@node1 ~]# cat /etc/redhat-release
CentOS release 6.7 (Final)
  1. 執行 getconf LONG_BIT能夠查看linux系統位數
[root@node1 ~]# getconf LONG_BIT
64
相關文章
相關標籤/搜索