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 188.8.131.52" >> /etc/resolv.conf echo "nameserver 184.108.40.206" >> /etc/resolv.conf
Alternatively you could just open it up for editing with vi or nano.
vi /etc/resolv.conf nano /etc/resolv.conf