服务器之家:专注于服务器技术及软件下载分享
分类导航

Linux|Centos|Ubuntu|系统进程|Fedora|注册表|Bios|Solaris|Windows7|Windows10|Windows11|windows server|

服务器之家 - 服务器系统 - Linux - 详解linux下查看系统版本号信息的方法(总结)

详解linux下查看系统版本号信息的方法(总结)

2022-01-25 17:16勤能补拙 Linux

本篇文章主要介绍了详解CentOS下查看系统版本号信息的方法(总结),具有一定的参考价值,有兴趣的可以来了解一下

有时候需要查看自己系统的CentOs的版本,有一些命令可以查看,分别介绍如下:查看Linux内核版本命令(两种方法)和Linux系统版本的命令(3种方法)

一、查看Linux内核版本命令(两种方法):

1、cat /proc/version

?
1
2
[root@localhost ~]# cat /proc/version
Linux version 2.6.18-194.8.1.el5.centos.plus (mockbuild@builder17.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP Wed Jul 7 11:50:45 EDT 2010

2、uname -a

?
1
2
[root@localhost ~]# uname -a
Linux localhost.localdomain 2.6.18-194.8.1.el5.centos.plus #1 SMP Wed Jul 7 11:50:45 EDT 2010 i686 i686 i386 GNU/Linux

二、查看Linux系统版本的命令(3种方法):

1、lsb_release -a,即可列出所有版本信息:

?
1
2
3
4
5
6
[root@localhost ~]# lsb_release -a
LSB Version: :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: CentOS
Description: CentOS release 5.5 (Final)
Release: 5.5
Codename: Final

这个命令适用于所有的Linux发行版,包括Redhat、SuSE、Debian…等发行版。

2、cat /etc/redhat-release,这种方法只适合Redhat系的Linux:

?
1
2
[root@localhost ~]# cat /etc/redhat-release
CentOS release 5.5 (Final)

3、cat /etc/issue,此命令也适用于所有的Linux发行版。

?
1
2
[root@localhost ~]# cat /etc/issue
CentOS release 5.5 (Final)

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持服务器之家。

原文链接:http://www.centoscn.com/CentOS/2017/0709/8866.html

延伸 · 阅读

精彩推荐