uname

-a, --all
print all information, in the following order, except omit -p
and -i if unknown:

-s, --kernel-name
print the kernel name

-n, --nodename
print the network node hostname

-r, --kernel-release
print the kernel release

cat /etc/redhat-release   看linux的版本

原文地址:https://www.cnblogs.com/todayORtomorrow/p/10507389.html