玩一台新的linux服务器,首先要做的,就是先看下是什么版本的系统;
命令如下:
登录到linux执行cat /etc/redhat-release ,例如如下:
[root@3.5.5Biz-46 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux AS release 4 (Nahant Update 1)
[root@3.5.5Biz-46 ~]#
# lsb_release -a
LSB Version: :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: CentOS
Description: CentOS release 5.4 (Final)
Release: 5.4
Codename: Final
这个命令适用于所有的linux,包括Redhat、SuSE、Debian等发行版。
以下方法适用于RedHat,CentOS
root@MyMail ~ # cat /etc/redhat-release
CentOS release 5.4 (Final)