I’ve got this issue recently when installed VirtualBox on my Manjaro Linux (this distro based on Arch Linux, so the solution would work there as well).
It seems that VirtualBox, while installing its virtual network adapters, had messed up the existing physical ones. That led to the situation when, once you reboot your machine, there is no network connection to the internet.
➜ ~ ping google.com ping: google.com: Name or service not known
Well, this is pretty easy to fix.
First, list all your installed hardware with the following command:
➜ ~ mhwd -lh -d
In result, you could see the long list of hardware that’s plugged in to your motherboard.
Just scroll down the list looking for the row with Ethernet adapter.
For example, this would look like this:
11: PCI 100.0: 0200 Ethernet controller SysFS ID: /devices/pci0000:00/0000:00:1c.0/0000:01:00.0 SysFS BusID: 0000:01:00.0 Hardware Class: network Model: "Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller" Vendor: pci 0x10ec "Realtek Semiconductor Co., Ltd." Device: pci 0x8168 "RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller" ... Driver Info #0: Driver Status: r8169 is not active Driver Activation Cmd: "modprobe r8169" Attached to: #8 (PCI bridge)
You’ve probably already spotted that section with the hint.
Driver Info #0: Driver Status: r8169 is not active Driver Activation Cmd: "modprobe r8169"
Our Ethernet driver is not active, but we were proposed a command to turn it on.
Note that modrpobe need root privileges to run, so we’ve got it prefixed with sudo.
➜ ~ sudo modprobe r8169 [sudo] password for user: ➜ ~ ping google.com PING google.com (126.96.36.199) 56(84) bytes of data. 64 bytes from lm-in-f139.1e100.net (188.8.131.52): icmp_seq=1 ttl=45 time=39.9 ms ...