当前位置 博文首页 > 文章内容

    如何查看Linux操作系统版本

    作者: 栏目:未分类 时间:2020-10-22 15:00:21

    本站于2023年9月4日。收到“大连君*****咨询有限公司”通知
    说我们IIS7站长博客,有一篇博文用了他们的图片。
    要求我们给他们一张图片6000元。要不然法院告我们

    为避免不必要的麻烦,IIS7站长博客,全站内容图片下架、并积极应诉
    博文内容全部不再显示,请需要相关资讯的站长朋友到必应搜索。谢谢!

    另祝:版权碰瓷诈骗团伙,早日弃暗投明。

    相关新闻:借版权之名、行诈骗之实,周某因犯诈骗罪被判处有期徒刑十一年六个月

    叹!百花齐放的时代,渐行渐远!



    如何查看Linux操作系统版本
    1. 查看内核版本命令:

     

    [root@tg ]# cat /proc/version 
    
    Linux version 3.10.0-693.2.2.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC) ) #1 SMP Tue Sep 12 22:26:13 UTC 2017
     
    [root@tg ]# uname -a
    
    Linux tg 3.10.0-693.2.2.el7.x86_64 #1 SMP Tue Sep 12 22:26:13 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
     
    [root@tg ]# uname -r
    
    3.10.0-693.2.2.el7.x86_64
     

    2. 查看Linux版本:
    1) 执行 lsb_release -a ,即可列出所有版本信息,例如:

    [root@tg ]# lsb_release -a
    
    LSB Version:    :core-4.1-amd64:core-4.1-noarch
    
    Distributor ID:    CentOS
    
    Description:    CentOS Linux release 7.5.1804 (Core) 
    
    Release:    7.5.1804
    
    Codename:    Core

    注:这个命令适用于所有的linux,包括Redhat、SuSE、Debian等发行版。
    2) 执行cat /etc/issue,例如如下:

    [root@tg ]# cat /etc/issue
    
    \S
    
    Kernel \r on an \m
    

    3) 执行cat /etc/redhat-release ,例如如下:

    [root@tg ]# cat /etc/redhat-release 
    
    CentOS Linux release 7.5.1804 (Core)