I don’t know what’s going on recently. The ubuntu connection cable is always unavailable to the Internet, but the wifi is still available, so I haven’t fiddled with it, but today I can’t even use the wifi, so I can only start repairing it.
ifconfig
enp2s0 Link encap:Ethernet hardware address 1c:39:47:d9:21:40
inet address:192.168.10.7 Broadcast:192.168.10.255 mask:255.255.255.0
inet6 address: fe80::f9fd:aae3:56b1:811/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 hops:1
Receive packet:700 error:0 discarded:0 overload:0 frames:0
Send packet:743 error:0 discarded:0 overload:0 carrier:0
collision:0 Send queue length:1000
Receive byte:113101(113.1 KB)Send byte:61412(61.4 KB)
lo Link encap:Local loopback
inet address:127.0.0.1 mask:255.0.0.0
inet6 address:::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 hops:1
Receive packet:5301 error:0 discarded:0 overload:0 frames:0
Send packet:5301 error:0 discarded:0 overload:0 carrier:0
collision:0 Send queue length:1000
Receive byte:387565(387.5 KB)Send byte:387565(387.5 KB)
wlp3s0 Link encap:Ethernet hardware address b8:81:98:c9:5c:d4
inet address:192.168.1.173 Broadcast:192.168.1.255 mask:255.255.255.0
inet6 address: fe80::d069:9062:bb59:e37c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 hops:1
Receive packet:1236 error:0 discarded:0 overload:0 frames:0
Send packet:2767 error:0 discarded:0 overload:0 carrier:0
collision:0 Send queue length:1000
Receive byte:71967(71.9 KB)Send byte:281053(281.0 KB)
The first enp2s0 is the name of my Ethernet, record it for future use.
sudo vi /etc/network/interfaces
The content here should look like this:
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopbac
Manually add the following at the end:
auto enp2s0
iface enp2s0 inte dhcp
sudo service network-manager restart
If it doesn't work, try to disable wifi, generally speaking, it will be solved.
Want to know more professional knowledge, forward-looking information, technical articles? Then please my personal official account: Attack program dog, make progress together!
Recommended Posts