1、查看linux系统版本
[[email protected] network-scripts]# 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: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 6
Release: 6
Codename: n/a
[[email protected] network-scripts]#
##适用于redhat
[[email protected] network-scripts]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6
[[email protected] network-scripts]#
2、查看内核版本
[[email protected] network-scripts]# cat /proc/version
Linux version 2.6.32-642.el6.x86_64 ([email protected]) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-17) (GCC) ) #1 SMP Tue May 10 17:27:01 UTC 2016
[[email protected] network-scripts]#
[[email protected] network-scripts]#
[[email protected] network-scripts]# uname -a
Linux centos6.8 2.6.32-642.el6.x86_64 #1 SMP Tue May 10 17:27:01 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
[[email protected] network-scripts]#
3、查看系统位数
[[email protected] ~]# getconf LONG_BIT
64
[[email protected] ~]# uname -r
2.6.32-642.el6.x86_64
[[email protected] ~]#
[[email protected] ~]# cat /proc/version
Linux version 2.6.32-642.el6.x86_64 ([email protected]) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-17) (GCC) ) #1 SMP Tue May 10 17:27:01 UTC 2016
[[email protected] ~]#