Linux views a summary of the methods for the system version
- 2020-05-27 07:58:40
- OfStack
1. View the Linux system distribution
Command 1:
lsb_release -a
This command applies to all Linux systems and displays the full version information, including the name of the Linux system, Debian, Ubuntu, CentOS, and the corresponding version number, as well as the code name for that version, for example, jessie will be displayed in Debian 8.
$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 8.0 (jessie)
Release: 8.0
Codename: jessie
Command 2:
cat /etc/issue
This command applies to all Linux systems, and the version information displayed is brief, with only the system name and the corresponding version number.
$ cat /etc/issue
Debian GNU/Linux 8 \n \1
Command 3:
cat /etc/redhat-release
This command applies only to the Redhat series Linux system, and the version information displayed is brief.
$ cat /etc/redhat-release
CentOS release 6.0 (Final)
2. View the Linux kernel version
Command 1:
uname -a
$ uname -a
Linux CodeBelief 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt9-3~deb8ul (2015-04-24) x86_64 GNU/Linux
Command 2:
cat /proc/version
$ cat /proc/version
Linux version 3.16.0-4-amd64 (debian-kernel@lists.debian.org) (gcc version 4.8.4 (Debian 4.8.4-1) ) #1 SMP Debian 3.16.7-ckt9-3~deb8ul (2.15-04-24)
The above is used to query Linux system version of the common command, I hope to help you.