Centos7 安装后无网络连接
1.切换目录
cd /etc/sysconfig/network-scripts
2.编辑指定文件
sudo vi ifcfg-ens33
3.文件内编辑
1.shirt + g跳转到最后一行 2.按 i 进入编辑模式 3.找到 ONBOOT 4.将no 改为 yes 5.按esc 6.冒号 7.冒号后面紧跟着输入wq 8.回车
4.重启服务
service network restart
cd /etc/sysconfig/network-scripts
sudo vi ifcfg-ens33
1.shirt + g跳转到最后一行 2.按 i 进入编辑模式 3.找到 ONBOOT 4.将no 改为 yes 5.按esc 6.冒号 7.冒号后面紧跟着输入wq 8.回车
service network restart