Skip to content

Instantly share code, notes, and snippets.

@maptastik
Created February 24, 2020 22:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maptastik/4c7662cae73c0de2369cf455feccb5e4 to your computer and use it in GitHub Desktop.
Save maptastik/4c7662cae73c0de2369cf455feccb5e4 to your computer and use it in GitHub Desktop.

On Ubuntu-flavored Linux distros, there appears to be a bug where when trying to access a URL, the browser gets hung up with a Resolving host... message for a long time. Sometimes the request will just stop and then maybe after a little while longer, the page will load. This seems to have been documented going back a couple major versions of Ubuntu and while there are several workarounds, the one that I found here worked for me:

$ sudo ls -la /etc/resolv.conf
> lrwxrwxrwx 1 root root 29 mar 7 20:20 /etc/resolv.conf -> ../run/resolvconf/stub-resolv.conf
$ sudo rm -f /etc/resolv.conf
$ sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
$ sudo ls -la /etc/resolv.conf
lrwxrwxrwx 1 root root 32 mar 8 07:30 /etc/resolv.conf -> /run/systemd/resolve/resolv.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment