ifconfig #centos6默认有
ip addr #centos7 默认没有, 需要安装: yum install -y net-tools
ifconfig -a #查看所有的网卡信息
关闭网卡:
ifdomn 网卡名
开启网卡:
ifup 网卡名
###切记不可单独使用
使用办法: ifdown 网卡名 && ifup 网卡名
ifconfig #centos6默认有
ip addr #centos7 默认没有, 需要安装: yum install -y net-tools
ifconfig -a #查看所有的网卡信息
关闭网卡:
ifdomn 网卡名
开启网卡:
ifup 网卡名
###切记不可单独使用
使用办法: ifdown 网卡名 && ifup 网卡名