Howto clear/Flush DNS Cache in Ubuntu

本文介绍了如何通过三种方法清除Ubuntu 12.04及更早版本中的DNS缓存,包括使用nscd守护进程、重启网络服务以及使用dns-clean工具。清除DNS缓存有助于解决连接超时错误、去除错误的IP地址等问题。
In this tip we will see some methods for flushing DNS cache under a system running Ubuntu 12.04 or older. But before showing you these commands, let's see some of the advantages of flushing DNS cache:
  • Resolve "connection timed out" errors when accessing certain websites
  • Avoid using online proxies to open certain websites
  • Prevent unauthorized users from seeing websites you visited through your DNS cache
  • Get rid of wrong IP addresses in your cache, etc.
To be able to flush (clear) DNS cache under Ubuntu 12.04, try one or more of these methods:

Method 1

Install first the nscd daemon with this command from the terminal:

sudo apt-get install nscd

Then clear your DNS data with this command:

sudo /etc/init.d/nscd restart

Method 2

You can also try to flush DNS cache with this command:

sudo /etc/init.d/networking restart

Method 3

Try also this command:

sudo /etc/init.d/dns-clean start

Good luck!

转载于:https://my.oschina.net/uniquejava/blog/331734

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值