以太网适配器在 Ubuntu 17.04 上被禁用

min*_*hky 17 networking ethernet 17.04

我使用的是 Ubuntu 17.04,但我不知道为什么我的以太网接口被禁用。

我试过了lshw -C network,它显示了这一点:

WARNING: you should run this program as super-user.
  *-network DISABLED        
       description: Ethernet interface
       product: 82579LM Gigabit Network Connection
       vendor: Intel Corporation
       physical id: 19
       bus info: pci@0000:00:19.0
       logical name: enp0s25
       version: 04
       serial: 00:21:cc:cd:28:8f
       capacity: 1Gbit/s
       width: 32 bits
       clock: 33MHz
       capabilities: bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=3.2.6-k firmware=0.13-3 latency=0 link=no multicast=yes port=twisted pair
       resources: irq:28 memory:f2500000-f251ffff memory:f253b000-f253bfff ioport:6080(size=32)
Run Code Online (Sandbox Code Playgroud)

我怎样才能启用它?

小智 39

以下是解决此问题的方法。

编辑文件/usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf并将其内容更改为:

[keyfile]
unmanaged-devices=*,except:type:wifi,except:type:wwan
Run Code Online (Sandbox Code Playgroud)

到 :

[keyfile]
unmanaged-devices=*,except:type:ethernet,except:type:wifi,except:type:wwan
Run Code Online (Sandbox Code Playgroud)

然后运行:

sudo service network-manager restart
Run Code Online (Sandbox Code Playgroud)

就这样。


小智 10

在我从 LTS 16.04 升级到 16.10 然后到 17.04 后,我的以太网也被禁用了。我能够通过手动执行以下操作来解决:

sudo ifconfig eth0 up 
sudo dhclient eth0
Run Code Online (Sandbox Code Playgroud)