ubuntu 联网失败

: Starting Raise network interfaces...
: RTNETLINK answers: File exists
: Failed to bring up enp0s3.
: networking.service: Main process exited, code=exited, status=1/FAILURE
: networking.service: Failed with result 'exit-code'.
: Failed to start Raise network interfaces.

方案1: /etc/network/interfaces(命令行方案)
方案2:Network-manager(图形化界面方案)

 

1:

首先打开终端,输入命令 sudo vim /etc/network/interfaces 进入到文件中开始我们的配置

只需要在该文件中添加如下内容:

auto ens33 #网卡名

iface ens33 inet static #设置为静态

address 192.168.190.3 #IP地址

netmask 255.255.255.0 #子网掩码

gateway 192.168.190.2 #网关

dns-nameserver 114.114.114.114 #DNS服务器

sudo /etc/init.d/networking restart 重启网络

 

2

sudo vim /etc/NetworkManager/NetworkManager.conf

 managed = true

sudo service network-manager restart

 

你可能感兴趣的:(ubuntu 联网失败)