[Linux-talk] View centOS system and kernel version number

For various reasons, we often need to see centOS system and kernel version number.

Here to centOS 6 as the starting point, shows several view the version number and kernel number of methods, but also verify the feasibility of on centOS 7.

A, centOS view the version number and the number of kernel methods 6

In centOS system environment 6.8, respectively, you can check system version information by using the following three methods to experiments

cat /etc/issue

lsb_release -a

cat / etc / redhat-release (I am most commonly used)

But environmental requirements such as docker is linux kernel version information, we need to have other commands.

By experiment shows, in an environment centOS 6.8, the following commands are available

cat /proc/version

uname -a

So, in centOS 7 environment, the command can be well run it?

Two operation, under the command of environment centOS 7

We can see this one show only cat / etc / redhat-release command is available, but the kernel version to view aspects of the two commands are used in the system version.

Third, the perception and summary

We can simultaneously view the version information centos 6 & 7 for cat / etc / redhat-release, a script written for the command double application environments simultaneously.

Other large-scale version of the script judging system, I personally recommend taking this command.

In terms of judging the kernel, I tend to use cat / proc / version command. But as you can see, under centos 6 & 7, both are possible

Guess you like

Origin www.cnblogs.com/sbhyc/p/11237096.html