查看linux系统版本
1. CentOS的
要查找CentOS版本,请在终端中输入以下命令:
cat /etc/*release*
以下示例输出显示您正在运行CentOS 6.5(您可以忽略大部分输出):
CentOS release 6.5 (Final)
LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
cat: /etc/lsb-release.d: Is a directory
CentOS release 6.5 (Final)
CentOS release 6.5 (Final)
2. Ubuntu的
要查找Ubuntu版本,请在终端中输入以下命令
lsb_release -a
以下示例输出显示您正在运行Ubuntu 14:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.1 LTS
Release: 14.04
Codename: trusty