查看Linux发行版的名称和版本号
Method #1: /etc/*-release file
在Terminal中执行命令:
cat /etc/*-release
我的输出结果:
DISTRIB_ID=Ubuntu DISTRIB_RELEASE=12.04 DISTRIB_CODENAME=precise DISTRIB_DESCRIPTION="Ubuntu 12.04.2 LTS" NAME="Ubuntu" VERSION="12.04.2 LTS, Precise Pangolin" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu precise (12.04.2 LTS)" VERSION_ID="12.04" |
Method #2: lsb_release Command
命令:
lsb_release -a
Sample Outputs:
Distributor ID: Ubuntu Description: Ubuntu 12.04.2 LTS Release: 12.04 Codename: precise |
查看内核版本
命令:
uname -a
or
uname -mrs