如何查看linux版本信息

本文介绍了如何在Linux系统中使用不同的命令来获取系统信息,包括主机名、操作系统版本、内核版本及GCC版本等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

查看系统信息

[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)

转载于:https://www.cnblogs.com/baisu/p/5109137.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值