centos7最小安装后无法联网解决方法

1 进入目录

cd /etc/sysconfig/network-scripts/

# 编辑网卡的配置文件
# 多网卡会对应多个配置文件,均以ifcfg-enp开头
# 新环境配置可任意选择,建议按一定顺序选择


  

vi  ifcfg-enp0s3

把onboot=no改为yes

保存

:wq

重启网络服务

service network restart  #重启网络 
ip addr  #查看IP地址



使用ifconfig



安装网络工具即可
yum install net-tools





原文地址:https://www.cnblogs.com/syscn/p/9802924.html