Detailed Methods of viewing system version number information under linux (Summary)
- 2020-06-12 11:35:50
- OfStack
Sometimes you need to view the CentOs version of your own system. There are 1 commands to view, respectively: View the Linux kernel version command (two methods) and Linux system version command (three methods).
1. View the Linux kernel version command (two ways) :
1.
cat /proc/version
[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
[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
2. View Linux system version commands (3 ways) :
1.
lsb_release -a
, all version information can be listed:
[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
This command applies to all Linux distributions, including Redhat, SuSE, Debian... And so on.
2,
cat /etc/redhat-release
, this method is only suitable for Linux of Redhat series:
[root@localhost ~]# cat /etc/redhat-release
CentOS release 5.5 (Final)
3,
cat /etc/issue
This command also applies to all Linux distributions.
[root@localhost ~]# cat /etc/issue
CentOS release 5.5 (Final)