查看Linux内核版本及发行版本

查看发行版本

1.查看内核版本

$ uname -sr
Linux 4.15.11-1.el7.elrepo.x86_64

$ uname -a
Linux localhost.localdomain 4.15.11-1.el7.elrepo.x86_64 #1 SMP Mon Mar 19 11:46:06 EDT 2018 x86_64 x86_64 x86_64 GNU/Linux

$ cat /proc/version
Linux version 4.15.11-1.el7.elrepo.x86_64 (mockbuild@Build64R7) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC)) #1 SMP Mon Mar 19 11:46:06 EDT 2018

2.查看发行版本

适用于所有linux发行版本

# cat /etc/os-release
NAME="CentOS Linux"
VERSION="8 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="8"

适用于redhat发行版本

$ yum install -y redhat-lsb-core

$ 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.4.1708 (Core)
Release:        7.4.1708
Codename:       Core

$ cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)

$ cat /etc/centos-release
CentOS Linux release 8.2.2004 (Core) 

$ cat /etc/system-release
Fedora release 27 (Twenty Seven)

适用于ubuntu发行版本

$ apt-get install lsb-core

$ lsb_release -a
LSB Version:    core-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.2 LTS
Release:        18.04
Codename:       bionic

适用于所有linux发行版本

$ cat /etc/issue
Debian GNU/Linux 10 \n \l

$ cat /etc/issue.net
Debian GNU/Linux 10 

适用于debain发行版本

$ cat /etc/debian_version
10.8

查看内核版本与发行版本对应关系

访问wiki查看发行版本与内核版本对应关系:https://en.wikipedia.org/wiki/CentOS

在这里插入图片描述

访问Red Hat官方链接:Red Hat Enterprise Linux Release Dates - Red Hat Customer Portal


这里写图片描述

  • 1
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值