So a customer came to me with an issue about not being able to install chkrootkit, due to DNS failure. The customer wasn’t technical and didn’t understand how to fix it. It’s easy to fix, by wiping the resolv.conf nameservers file, and rebuilding it. Takes a few seconds, this should allow you to resolve domains afterwards again.
# Delete resolv.conf rm /etc/resolv.conf # Recreate the DNS file with different DNS servers touch /etc/resolv.conf echo "nameserver 18.104.22.168" >> /etc/resolv.conf echo "nameserver 22.214.171.124" >> /etc/resolv.conf
Alternatively you could just open it up for editing with vi or nano.
vi /etc/resolv.conf nano /etc/resolv.conf