zoukankan      html  css  js  c++  java
  • linux查看系统类型和版本

    首先大致普及下linux系统的版本内容。

    1.内核版本和发行版本区别

    我的理解,内核版本就是指linux中最基层的代码,版本号如 Linux version 3.10.0-327.22.2.el7.x86_64

    发行版本就是在某版本内核的基础上加了发行商自己想加进去的很多软件代码,比如 CentOS Linux release 7.2.1511 (Core)

    2.redhat和centos区别

    一般我们使用的阿里云的都是centos,但是有的人又说是redhat,其实两者差不多;

    red hat全称Red Hat Enterprise Linux(以下称之为RHEL),一般是提供给企业付费使用的,其包含相应的商业服务;

    centOS是这个RHEL的克隆版本,或者叫免费版本,当然不提供商业服务;

    一句话,您可以简单认为centos就是免费用的redhat,所以享受不到redhat的技术支持和服务; 

    我们就马虎的认为他们是一个东西吧。

    3.查看linux系统内核版本

    (1)cat /proc/version

    Linux version 3.10.0-327.22.2.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) ) #1 SMP Thu Jun 23 17:05:11 UTC 2016

    (2)uname -a

    Linux iZuf62oby5qekm4qmwbmrcZ 3.10.0-327.22.2.el7.x86_64 #1 SMP Thu Jun 23 17:05:11 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

    4.查看linux系统发行版本

    (a)lsb_release -a

    LSB Version: :core-4.1-amd64:core-4.1-noarch
    Distributor ID: CentOS
    Description: CentOS Linux release 7.2.1511 (Core)
    Release: 7.2.1511
    Codename: Core

    (b) cat /etc/redhat-release

    CentOS Linux release 7.2.1511 (Core)

    (c)cat /etc/issue

    我的系统没执行出来,所以说不同的系统可能命令不太一样;

  • 相关阅读:
    2. Add Two Numbers
    1. Two Sum
    22. Generate Parentheses (backTracking)
    21. Merge Two Sorted Lists
    20. Valid Parentheses (Stack)
    19. Remove Nth Node From End of List
    18. 4Sum (通用算法 nSum)
    17. Letter Combinations of a Phone Number (backtracking)
    LeetCode SQL: Combine Two Tables
    LeetCode SQL:Employees Earning More Than Their Managers
  • 原文地址:https://www.cnblogs.com/suyuan1573/p/6185302.html
Copyright © 2011-2022 走看看