linux dns 刷新_如何为Windows和Linux操作系统刷新DNS?

linux dns 刷新

linux dns 刷新

Operating systems like Windows, Linux, BSD runs some mechanisms to cache DNS records in the local system. Caching DNS records locally gives less bandwidth and fast internet access to the user. In this post, we will look at how to flush DNS cache in  the operating systems like Windows and Linux (Ubuntu, CentOS, Fedora, Debian, etc.)

Windows,Linux,BSD等操作系统运行某些机制以将DNS记录缓存在本地系统中。 在本地缓存DNS记录可减少带宽并为用户提供快速的Internet访问。 在本文中,我们将研究如何在Windows和Linux(Ubuntu,CentOS,Fedora,Debian等)操作系统中刷新DNS缓存。

Windows的DNS刷新 (Flush DNS For Windows)

Windows operating system provides flush operation from the command line with ipconfig tools. Flushing DNS cache required Administrator privileges in Windows operating system from Windows Vista to Windows 10. Windows XP by default provides Administrator privilege. We will use ipconfig flush DNS mechanism for Windows.

Windows操作系统使用ipconfig工具从命令行提供刷新操作。 从Windows Vista到Windows 10,需要刷新DNS缓存。Windows操作系统中的管理员权限默认情况下,Windows XP提供管理员权限。 我们将为Windows使用ipconfig flush DNS机制。

Open MS-DOS command as Administrator by clicking the right mouse button.

通过单击鼠标右键,以管理员身份打开MS-DOS命令。

Open CMD.exe
Open CMD.exe
打开CMD.exe

Click Yes to open MSDOS prompt as Administrator privileges

单击“是”以管理员权限打开MSDOS提示符。

Open CMD.exe
Open CMD.exe
打开CMD.exe

We will use ipfoncifg command with the /flushdns option like below. Write command below to flush DNS cache

我们将把ipfoncifg命令与/flushdns选项一起使用,如下所示。 在下面写入命令以刷新DNS缓存

> ipconfig /flushdns
Flush DNS For Windows
Flush DNS For Windows
Windows的DNS刷新

Successful. We have completed clearing DNS cache

成功了我们已经完成了DNS缓存的清除

Linux的嵌入式DNS(Flush DNS For Linux)

Linux operating system provides different tools and mechanisms for DNS caching. We will look most popular and useful two methods to clear DNS cache. These operations require root privileges.

Linux操作系统为DNS缓存提供了不同的工具和机制。 我们将看两种最受欢迎​​和最有用的清除DNS缓存的方法。 这些操作需要root特权。

Method 1 is restarting Network Services of the Linux operating system.

方法1是重新启动Linux操作系统的网络服务。

Ubuntu,Debian: (Ubuntu, Debian:)

$ sudo systemctl restart networking.service

CentOS,Fedora: (CentOS, Fedora:)

$ sudo systemctl restart network.service
Flush DNS For Linux
Flush DNS For Linux
Linux的嵌入式DNS

使用名称服务缓存守护程序刷新DNS (Flush DNS with Name Service Cache Daemon)

Linux operating systems use some cache mechanism for DNS and IP matches. This makes the DNS queries run faster without asking a DNS server every time. Most of the requiring DNS queries will be answered from DNS cache. This may create a problem after some time. We can flush and clear this DNS cache named nscd with the following command. This command will restart nscd daemon.

Linux操作系统对DNS和IP匹配使用某种缓存机制。 这使得DNS查询运行得更快,而无需每次都询问DNS服务器。 大部分需要的DNS查询将从DNS缓存中得到答复。 一段时间后可能会产生问题。 我们可以使用以下命令刷新并清除名为nscd DNS缓存。 此命令将重新启动nscd守护程序。

$ sudo /etc/init.d/nscd restart
LEARN MORE  How To Fix Dns Lookup Failed
了解更多如何修复Dns查找失败

翻译自: https://www.poftut.com/how-to-flush-dns-for-windows-and-linux-operating-systems/

linux dns 刷新

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值