I've just installed Arch. My computer is connected to my router/modem via Ethernet cable.

I just logged in and tried using pacman to install a package but got a bunch of "could not resolve host" errors.

enter image description here

When I run ping google.com it sometimes works but other times gives this error: Temporary failure in name resolution.

Output of ip addr enter image description here

Contents of /etc/resolv.conf enter image description here

  • 1
    It's clear you have DNS issues. Check /etc/resolv.conf. It not that, then I would say you have no network setup. Commented Dec 17, 2021 at 16:27
  • Use Server =$repo/os/$arch to check if it is DNS issue. This is the mirror name mirror.rackspace.com Commented Dec 17, 2021 at 16:52
  • @Bib What should I be looking for in that file? It exists and I will add to my question the contents of it.
    – Username
    Commented Dec 20, 2021 at 23:25
  • @AbdullahIbnFulan Can you tell me, step by step, what you're asking me to do? I tried typing your idea in command line and got "Server: command not found" error.
    – Username
    Commented Dec 20, 2021 at 23:27
  • Please don't post images of text.
    – Jim L.
    Commented Dec 21, 2021 at 4:07

4 Answers 4


It looks like you have both dhcpcd and network-manager installed. Having two packages to manage your network causes conflicts. Try uninstalling one of them.

  • I added that line to the bottom of the file but still get the same error when running ping google.com
    – Username
    Commented Dec 20, 2021 at 23:56
  • Check if you have your hostname set up(/etc/hostname)
    – Gagan
    Commented Dec 20, 2021 at 23:58
  • Also try ip addr to check if your interface is up.
    – Gagan
    Commented Dec 21, 2021 at 0:03
  • I have the name in /etc/hostname, though when I run hostname in terminal it says "command not found"
    – Username
    Commented Dec 21, 2021 at 0:03
  • I added the output of ‘ip addr’
    – Username
    Commented Dec 21, 2021 at 0:08

It's generally a DNS-related issue. Since Arch is now typically dominated by Systemed, it's likely that the problem lies with one of its daemons, systemd-resolved, which provides network name resolution to local applications.

So, the first step is to check its status:

systemctl status systemd-resolved

If you see that the value of Active field is inactive, you need to start it:

systemctl start systemd-resolved

According ip addr, it appears you have not connected and authenticated to a wireless network yet.

Use iwctl to connect to a network:

iwctl --passphrase <passphrase> station wlp1s0 connect <SSID>
  • I will try this. But why won't my internet work even when connected to my modem via Ethernet cable?
    – Username
    Commented Dec 21, 2021 at 0:18
  • @Username there could be a driver problem since your Ethernet device does not show up in ip. You can check dmesg to see if there are any errors. If there isn't anything, you should check your BIOS settings to make sure Ethernet isn't disabled.
    – Snake
    Commented Dec 21, 2021 at 0:27
  • I just realized I accidentally unplugged the Ethernet cable. I plugged it back in and edited my question with the correct ip addr output. Still getting the same errors though.
    – Username
    Commented Dec 21, 2021 at 0:28
  • @Username could be a DHCP issue as your Ethernet device is not being assigned an IP address by your router. Check your router settings if DHCP is correctly setup and if any other connected computers are being assigned IP addresses.
    – Snake
    Commented Dec 21, 2021 at 0:41
  • 1
    @Username I see that you have two DHCP clients running (dhcpcd and NetworkManager). This can cause conflicts so only one should be running. Disable dhcpcd: sudo systemctl disable --now dhcpcd.service
    – Snake
    Commented Dec 21, 2021 at 0:50

My particular issue was not having installed linux-firmware before rebooting without the flash ISO. The wireless device was missing altogether from ip addr. The solution was to :

  1. Boot from the arch iso.
  2. Use iwctl to connect to the wireless network
  3. After having installed a working network connection arch-chroot into my installation (mount it again if needed).
  4. pacman -S linux-firmware

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .