12 May 2017

Linux Command dig Nor Working, How To Solve


Yesterday, I experienced a very odd error in my new installed Rosa Linux R9 : the dig command not working! Every time I tried to dig or dig ns a domain, there is no result.  I reconnected the internet connection, I rebooted the OS, but the result was still same.

I didn't know whether it is the distro issue or not, but I've finally found the solution. Here are the steps :

  1. Edit /etc/resolv.conf
    sudo vi /etc/resolv.conf
  2. Replace the default record with these records :
    nameserver 8.8.8.8
    nameserver 8.8.4.4
  3. Make the resolv.conf immune so the network-manager can't automatically replace it
    sudo chattr +i /etc/resolv.conf
  4. Done

No comments: