如何查看linux版本信息

查看系统信息

[root@root]# hostnamectl 
   Static hostname: root
         Icon name: computer-desktop
           Chassis: desktop
        Machine ID: db9126f442d8418d8071d47f6a592a99
           Boot ID: 7b7e9236776c473982e0c72299ea0337
  Operating System: CentOS Linux 7 (Core)
       CPE OS Name: cpe:/o:centos:centos:7
            Kernel: Linux 3.10.0-327.36.1.el7.x86_64
      Architecture: x86-64

查看是哪个发行版:

[root@yl-pc vm]# lsb_release -a
LSB Version:	:core-4.1-amd64:core-4.1-noarch
Distributor ID:	RedHatEnterpriseServer
Description:	Red Hat Enterprise Linux Server release 7.0 (Maipo)
Release:	7.0
Codename:	Maipo

查看内核版本和gcc信息:

[root@yl-pc vm]# cat /proc/version 
Linux version 3.10.0-123.el7.x86_64 (root@localhost.localdomain) (gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) ) #1 SMP Tue Jan 20 03:54:54 CST 2015

查看内核版本:

[root@yl-pc vm]# uname -a
Linux yl-pc 3.10.0-123.el7.x86_64 #1 SMP Tue Jan 20 03:54:54 CST 2015 x86_64 x86_64 x86_64 GNU/Linux

如果是REDHAT的系统,还可以查看:

[root@yl-pc vm]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.0 (Maipo)
posted @ 2016-01-07 11:17  leesea  阅读(439)  评论(0)    收藏  举报