I am using different distros via VirtualBox. I stumbled on Arch Linux as a natural platform to do that. However, I am having the following issue:

On my non-root account, post-installation...

Attempting to ping -c 3 www.google.com results in "ping:unknown host www.google.com".

Attempting to ping -c 3 results in "Network is unreachable".

Attempting to sudo pacman -S alsa-utils results in "error: failed retrieving file '' from : Could not resolve host: " for all files.

I am running a Windows 7 64-bit host and VirtualBox 4.3.28. I have a motherboard with an Intel ethernet NIC (this is the only one connected to my router and the only host OS-enabled adapter), a third-party ethernet NIC, and a WiFi adapter. Network settings in VirtualBox are defaults. Internet works for the host, all other VMs, and for the Arch Linux (2015.07.01) live installation (ping and downloads worked pre-installation).

Here are the exact actions and commands I executed during installation (ignoring my notes). Edit: Pastie redacted the important line (46) xD; it reads "systemctl enable dhcpcd@eth0.service". These steps were taken from the Arch Linux Beginners' Guide and Lifehacker.

Original thread

closed as off-topic by jasonwryan, Stephen Kitt, cuonglm, hildred, roaima Jul 25 '15 at 16:15

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers." – jasonwryan, Stephen Kitt, cuonglm, hildred, roaima
If this question can be reworded to fit the rules in the help center, please edit the question.


I found that eth0 was not the name of my interface. systemctl enable dhcpcd@enp0s3.service solved the problem. Thank you very much.


Make sure your virtual box has a network interface provided to the virtual OS. (Settings > Network > Adapter 1 > Attached to NAT). It is for sure not the only way to do it but it might be the easiest for you.

Also make sure that your that your network adapter is up and uses DHCP. For example the file "interfaces" could look about like that

$ cat /etc/network/interfaces
auto eth1
iface eth1 inet dhcp

Check if you have an IP address using "ifcongfig" (look for "inet addr")

$ ifconfig 

eth1      Link encap:Ethernet  HWaddr 00:03:2d:23:2d:0f  
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::203:2dff:fe23:2d0f/64 Scope:Link
          RX packets:494587 errors:0 dropped:0 overruns:0 frame:0
          TX packets:423021 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:305034072 (305.0 MB)  TX bytes:77050307 (77.0 MB)
          Interrupt:18 Memory:f7b00000-f7b20000
  • Thank you for your comment, @Merlean. I was able to solve the problem at the original thread. However, as a new Linux user, the commands you demonstrated will be useful in the future. – Polite Master Jul 25 '15 at 1:52

Not the answer you're looking for? Browse other questions tagged or ask your own question.