Linux views a summary of the methods for the system version
- 2020-05-27 07:58:40
1. View the Linux system distribution
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
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
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
$ 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
$ cat /proc/version Linux version 3.16.0-4-amd64 (email@example.com) (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.