Clear DNS cache under Linux

Usually sometimes we cannot open the webpage through the domain name, which may cause the DNS cache (the ip address resolved by DNS has changed). The solution is as follows:

     Method 1: $nslookup ecafe.pub (here is the domain name you want to open)

     Method 2: $sudo /etc/init.d/nscd restart

         or: $service nscd restart

         or: $service nscd reload

         If nscd cannot be executed, install nscd first. The command is as follows: $sudo apt-get install nscd

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325018696&siteId=291194637