Home  >  Article  >  Operation and Maintenance  >  How to check version in linux

How to check version in linux

(*-*)浩
(*-*)浩Original
2019-12-11 13:18:155233browse

How to check version in linux

1, # uname -a (Linux view version of the current operating system kernel information) (Recommended learning: linux tutorial)

[hadoop@admin01 ~]$ uname -a
Linux admin01 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

2, # cat /proc/version (Linux to view the current operating system version information)

[hadoop@admin01 ~]$ cat /proc/version 
Linux version 2.6.32-358.el6.x86_64 (mockbuild@c6b8.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) ) #1 SMP Fri Feb 22 00:31:26 UTC 2013

3, # cat /etc/issue or cat /etc/ redhat-release (Linux view version current operating system release information)

[hadoop@admin01 ~]$ cat /etc/issue
CentOS release 6.4 (Final)
Kernel \r on an \m
[hadoop@admin01 ~]$ cat /etc/redhat-release
CentOS release 6.4 (Final)

# lsb_release -a (query system version)

[root@Rocky opt]# lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 7.4.1708 (Core) 
Release:    7.4.1708
Codename:   Cor

Note : This query version information is done on another machine. If you need to use this command to query on the local machine, you first need to install this command with yum.

In order to display it vividly, I personally used the command yum install -y redhat-lsb to perform an installation on the cluster. Because there are more packages to download, it will take a little longer.

The above is the detailed content of How to check version in linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn