I have just installed Ubuntu Server 18.04 and set up SSH so I can continue configuring via my desktop but I've run into some issues that I can't seem to get past.

I was trying to run

sudo apt-get update

but was constantly getting the errors.

Temporary failure resolving archive.ubuntu.com

Failed to fetch http://archive.ubuntu........

I checked to see if my internet connection was ok by running


and I got a response, all ok there.

I suspected that maybe my DNS was not set-up correctly so I tried

ping www.google.com

and got the error.

Temporary failure in name resolution

Ok, so i had determined that it is, in fact, some sort of dns issue, but all the “answers” i've tried have not worked for me.

I've tried editing /etc/resolv.conf without luck as it appears to be a symbolic link.

I found an answer here which only works if i run from root, ie.

sudo bash

But it instructs to reverse the changes afterwards by.

rm /etc/resolv.conf
ln -s /run/resolvconf/resolv.conf /etc/resolv.conf

If i do that i will lose that connection

  • Tell me the best way to just leave it as it is?
  • Is there any way to solve this?
  • And is the cause of the problem the fact that /run/resolvconf/resolv.conf doesn't actually exist?
Best Answer

The only way i figured out to get the wired network going is this

    sudo dhclient -v -4

works great, however, this has to be done manually after every boot and after every network disconnect/reconnect, so it works but it is a manual solution, not the permanent solution;

to get the wireless network going automatically, simply.

    sudo apt-get install nm-tray network-manager

you probably have to reboot; then you will be able to use the wireless network icon that appears in the notification area in your control panel (make sure the notification area is added to the panel) to select a wireless network; after that, it will reconnect automatically;

however, to get the wired network to reconnect automatically, I tried installing avahi-daemon and avahi-autoipd but apparently, it is not helping; even tried:

    sudo systemctl start NetworkManager
    sudo systemctl enable NetworkManager

basically, if you install a distro such as Xubuntu desktop, the proper tool(s)/daemon/config is installed and the network is detected automatically when it is plugged in without any user configuration; would be nice to know which tool/daemon/config/setting does that.