找到ifcfg-ens33文件,此文件的目录在/etc/sysconfig/network-scripts目录下
cd /etc/sysconfig/network-scripts/
修改文件属性 ONBOOT 使用vi或vim命令修改文件中的ONBOOT属性为yes即可
--修改文件
vi ifcfg-ens33
重启网络
service network start
安装net-tools
--使用yum install net-tools
yum install net-tools
--或者
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
再次输入ifconfig就能使用命令了