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

论坛 期权论坛 编程之家     
选择匿名的用户   2021-6-2 20:18   2919   0
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
了解更多如何修复Dns查找失败

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

linux dns 刷新

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:3875789
帖子:775174
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP