查看Linux内核与常见Linux发行版本

2022-02-17  本文已影响0人  四月不见

----- 最近更新【2022-02-16】-----

本文目录结构预览:

一、查看内核版本与发行版本

1、查看内核版本

1)查看/proc/version文件

[nosee@noseecomputer ~]$ cat /proc/version
Linux version 5.4.0-97-generic (buildd@lcy02-amd64-032) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #110-Ubuntu SMP Thu Jan 13 18:22:13 UTC 2022
[nosee@noseecomputer ~]$ cat /proc/version_signature 
Ubuntu 5.4.0-97.110-generic 5.4.162

注:有些系统没有/proc/version_signature文件,但大部分都会有/proc/version文件

2)使用命令uname

[nosee@noseecomputer ~]$ uname -r
5.4.0-97-generic
[nosee@noseecomputer ~]$ uname -a
Linux noseecomputer 5.4.0-97-generic #110-Ubuntu SMP Thu Jan 13 18:22:13 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

3)使用命令hostnamectl

[nosee@noseecomputer ~]$ hostnamectl
   Static hostname: noseecomputer
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 29f35c35fb224975bf84206688ec222d
           Boot ID: 95b18dada8a14163afd7f9336995c28e
    Virtualization: vmware
  Operating System: Ubuntu 20.04.2 LTS
            Kernel: Linux 5.4.0-97-generic
      Architecture: x86-64

2、查看发行版本

1)查看文件 /etc/issue/etc/redhat-release

Ubuntu:

[nosee@noseecomputer ~]$ cat /etc/issue
Ubuntu 20.04.2 LTS \n \l

Debian:

[nosee@instance-4 ~]$ cat /etc/issue
Debian GNU/Linux 10 \n \l

CentOS:(注:RedHat 系列发行版本才会有/etc/redhat-release这个文件)。

[root@localhost ~]# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)

2)使用命令lsb_release

Ubuntu:

[nosee@noseecomputer ~]$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.2 LTS
Release:    20.04
Codename:   focal

Debian:

[nosee@instance-4 ~]$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 10 (buster)
Release:        10
Codename:       buster

CentOS:

[root@localhost ~]# lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 7.9.2009 (Core)
Release:    7.9.2009
Codename:   Core

3)使用命令rpm,针对 RedHat 系列

CentOS:

[root@localhost ~]# rpm -q centos-release
centos-release-7-9.2009.1.el7.centos.x86_64

RedHat 则用rpm -q redhat-release

二、Linux 内核

1、内核版本命名规则
主版本.次版本.释出版本-修定版本
如:5.4.0-97.110

2、积极支持版本

版本 维护者 发行时间 停止维护
5.15 Greg Kroah-Hartman & Sasha Levin 2021-10-31 2023-10
5.10 Greg Kroah-Hartman & Sasha Levin 2020-12-13 2026-12
5.4 Greg Kroah-Hartman & Sasha Levin 2019-11-24 2025-12
4.19 Greg Kroah-Hartman & Sasha Levin 2018-10-22 2024-12
4.14 Greg Kroah-Hartman & Sasha Levin 2017-11-12 2024-1
4.9 Greg Kroah-Hartman & Sasha Levin 2016-12-11 2023-1

三、常见的Linux发行版

名称 网址 软件包管理器 特 点
Debain www.debian.org apt 开放的开发模式,且易于进行软件包升级
Ubuntu www.ubuntu.com apt 优秀已用的桌面环境,基于 Debian 构建
RedHat www.redhat.com yum(rpm) 适用于服务器的版本是Red Hat Enterprise Linux,而由于这是个收费的操作系统,免费的版本是CentOS。
Fedora https://getfedora.org up2date(rpm),yum(rpm) 也是跟红帽有关系的开源Linux操作系统,由社群开发维护
CentOS www.centos.org yum(rpm) 社区企业操作系统,完全免费,稳定性极好,可以看作RedHat的免费开源再编译版本。
Gentoo www.gentoo.org portage 官宣是一种高可配置的系统,使用一种叫portage的技术。高度的可定制性,使用手册完整
Knoppix www.knoppix.com apt 可以直接在 CD 上运行,具有优秀的硬件检测和适配能力,可作为系统的急救盘使用
Mandriva
(过去叫:Mandrake)
www.mandriva.com rpm 操作界面友好,使用图形配置工具,有庞大的社区进行技术支持,支持 NTFS 分区的大小变更
SuSE www.suse.com
OpenSUSE www.opensuse.org YaST(rpm),第三方 apt (rpm)软件库(repository) 国最著名的Linux发行版本,专业,易用的YaST软件包管理系统
deepin www.deepin.org 产Linux操作系统,致力于最好用的桌面系统,在国内Linux发行版匮乏的情况下扛起了大旗,勇气可嘉,产品也得到了不错的反响。
Android developer.android.com 大家很熟悉了,它的内核就是Linux,也算是一种Linux发行版。

四、参考

上一篇下一篇

猜你喜欢

热点阅读