1. Run the following command to view the kernel version:
Cat/proc/version
Uname-
Uname-rcat/etc/issue
Man uname
2. view the linux version: Copy as follows:
1) log on to the server and execute lsb_release-a to list all version information, for example:
[Root@3.5.5Biz-46 ~] # Lsb_release-
Lsbversion: 1.3
Distributor ID: RedHatEnterpriseAS
Descr restart ption: Red Hat Enterprise Linux AS release 4 (Nahant Update 1)
Release: 4
Codename: NahantUpdate1
[Root@3.5.5Biz-46 ~] #
This command applies to all linux releases, including Redhat, SuSE, and Debian.
2) log on to linux and run cat/etc/redhat-release, for example:
[Root@3.5.5Biz-46 ~] # Cat/etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 1)
[Root@3.5.5Biz-46 ~] #
In this way, you can see the specific version number, such as AS4 Update 1.
3) log on to linux and execute rpm-q redhat-release, for example
[Root@3.5.5Biz-46 ~] # Rpm-q redhat-release
Redhat-release-4AS-2.4
[Root@3.5.5Biz-46 ~] #
In this way, we can see a so-called release number. For example, the above example is 2.4.
There is a certain correspondence between the release number and the actual version, as shown below:
Redhat-release-3AS-1-> Redhat Enterprise Linux AS 3
Redhat-release-3AS-7.4-> Redhat Enterprise Linux AS 3 Update 4
Redhat-release-4AS-2-> Redhat Enterprise Linux AS 4
Redhat-release-4AS-2.4-> Redhat Enterprise Linux AS 4 Update 1
Redhat-release-4AS-3-> Redhat Enterprise Linux AS 4 Update 2
Redhat-release-4AS-4.1-> Redhat Enterprise Linux AS 4 Update 3
Redhat-release-4AS-5.5-> Redhat Enterprise Linux AS 4 Update 4
Note: method (2) (3) is only valid for Redhat Linux.