Accidentally deleted /etc/resolv.conf and now can't access any domain
Solution 1:
To fix this you should recreate the link how it was. On 18.04 /etc/resolv.conf
points to ../run/systemd/resolve/stub-resolv.conf
.
So to fix your problem it should be enough to do the following:
sudo rm resolv.conf
sudo ln -s /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf