当前位置:首页 > Linux > 正文内容

如何查看Linux发行版本

放牧的风7年前 (2019-02-17)Linux1337

1、lsb_release -a

[root@node1484 tools]# 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.2.1511 (Core) 
Release:    7.2.1511
Codename:    Core

使用该命令是如果提示:

[root@node1483 ~]# lsb_release -a
-bash: lsb_release: 未找到命令

使用命令安装:yum install -y redhat-lsb

2、cat /etc/redhat-release

适用于RedHat、CentOS

[root@node1484 tools]# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)

  

扫描二维码推送至手机访问。

版权声明:本文由放牧的风发布,如需转载请注明出处。

本文链接:https://grazingwind.com/post/38.html

分享给朋友:

相关文章

Linux CentOS 7 防火墙/端口设置

Linux CentOS 7 防火墙/端口设置

CentOS升级到7之后用firewall代替了iptables来设置Linux端口,下面是具体的设置方法:[]:选填<>:必填[<zone>]:作用域(block、dmz、drop、external、home、in...

CentOS7一键安装nodejs

CentOS7一键安装nodejs

1.在CentOS 7机器上安装Node.js有几种不同的方法。 在本教程的第一部分中,我们将从NodeSource存储库安装Node.js。首先,我们需要启用NodeSource存储库:curl -sL https:/...

CentOS下配置redis允许远程连接

CentOS下配置redis允许远程连接

1. 目的因为想要学习redis,因此在虚拟机中安装了redis,为了实现在物理机可以访问redis,弄了好久;因此记录下来,以免忘记。2. 环境虚拟机:CentOS Linux release 7.4.1708 (Core)redis:4...

linux服务器git pull/push时提示输入账号密码之免除设置

linux服务器git pull/push时提示输入账号密码之免除设置

1、先cd到根目录,执行git config --global credential.helper store命令[root@iZ25mi9h7ayZ ~]# git config --global&...

VPS免费检测工具

VPS免费检测工具

1、一键测试服务器到国内的速度脚本Superspeed.sh :wget https://raw.githubusercontent.com/oooldking/script/master/superspeed.shchmod&n...