注:proc目录下记录的当前系统运行的各种数据,version记录的版本信息直接可以通过cat查看到。
第一种
使用命令:cat /proc/version 查看
proc目录下记录的当前系统运行的各种数据,version记录的版本信息可以直接通过cat查看到,还可以看到gcc版本信息。
第二种
使用命令:uname -a 查看
如上图显示自己的内核版本,并且可查看系统是64位(x86_64);
uname -m 输出:x86_64
第三种
使用命令:lsb_release -a 查看
# lsb_release --help
Usage: lsb_release [options]
Options:
-h, --help show this help message and exit
-v, --version show LSB modules this system supports
-i, --id show distributor ID
-d, --description show description of this distribution
-r, --release show release number of this distribution
-c, --codename show code name of this distribution
-a, --all show all of the above information
-s, --short show requested information in short format
# lsb_release -r
Release: 12.04
用这个命令可查看我的版本是12.04;
第四种
cat /etc/issue
输出:Ubuntu 12.04 LTS \n \l