zoukankan      html  css  js  c++  java
  • 查看linux系统版本相关信息

    1.查看内核版本:cat /proc/version

    A机器
    root@debian:~# cat /proc/version
    Linux version 3.10.102-2-686 (ty@debian) (gcc version 4.7.2 (Debian 4.7.2-5) ) #1 SMP Sat Sep 17 21:47:55 EDT 2016
    B机器
    [root@bogon ~]# cat /proc/version
    Linux version 3.10.0-957.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) ) #1 SMP Thu Nov 8 23:39:32 UTC 2018

    2.查看发行版本信息  cat /etc/*-release   或   cat /etc/issue

     A机器

    root@debian:~# cat /etc/*-release
    PRETTY_NAME="Debian GNU/Linux 7 (wheezy)"
    NAME="Debian GNU/Linux"
    VERSION_ID="7"
    VERSION="7 (wheezy)"
    ID=debian
    ANSI_COLOR="1;31"
    HOME_URL="http://www.debian.org/"
    SUPPORT_URL="http://www.debian.org/support/"
    BUG_REPORT_URL="http://bugs.debian.org/"
    root@debian:~# cat /etc/issue
    Debian GNU/Linux 7 
     
    B机器
    [root@bogon ~]# cat /etc/*-release
    CentOS Linux release 7.6.1810 (Core) 
    NAME="CentOS Linux"
    VERSION="7 (Core)"
    ID="centos"
    ID_LIKE="rhel fedora"
    VERSION_ID="7"
    PRETTY_NAME="CentOS Linux 7 (Core)"
    ANSI_COLOR="0;31"
    CPE_NAME="cpe:/o:centos:centos:7"
    HOME_URL="https://www.centos.org/"
    BUG_REPORT_URL="https://bugs.centos.org/"
    
    CENTOS_MANTISBT_PROJECT="CentOS-7"
    CENTOS_MANTISBT_PROJECT_VERSION="7"
    REDHAT_SUPPORT_PRODUCT="centos"
    REDHAT_SUPPORT_PRODUCT_VERSION="7"
    
    CentOS Linux release 7.6.1810 (Core) 
    CentOS Linux release 7.6.1810 (Core) 

     从上面信息可以分析出

    A机器:Debian 7 x86; B机器:CentOS 7 x86_64

  • 相关阅读:
    BZOJ 2956: 模积和
    BZOJ 1113: [Poi2008]海报PLA
    停课刷题总结-给自己一点鼓励吧
    BZOJ 2751: [HAOI2012]容易题(easy)
    Vijos 1100 加分二叉树
    BZOJ 1756: Vijos1083 小白逛公园
    BZOJ 1709: [Usaco2007 Oct]Super Paintball超级弹珠
    BZOJ 1652: [Usaco2006 Feb]Treats for the Cows
    BZOJ 1651: [Usaco2006 Feb]Stall Reservations 专用牛棚
    BZOJ 1631: [Usaco2007 Feb]Cow Party
  • 原文地址:https://www.cnblogs.com/sylvia-liu/p/11598880.html
Copyright © 2011-2022 走看看