查找首选DNS服务器的方法如下:
1、打开命令提示符(Windows)或终端(Mac/Linux):
Windows:按下Win + R键,输入"cmd",然后按下Enter键。
Mac:打开应用程序文件夹,找到"实用工具"文件夹,双击打开"终端"。
Linux:根据所使用的Linux发行版,可以在菜单中找到终端应用程序。
2、在命令提示符或终端中输入以下命令并按下Enter键:
Windows:ipconfig /all
Mac/Linux:ifconfig
3、在输出结果中查找首选DNS服务器信息,以下是一些常见的输出示例:
Windows:
“`
Ethernet adapter 以太网适配器:
Connectionspecific DNS Suffix . : example.com
Description . . . . . . . . . . . : Realtek PCIe GbE Family Controller
Physical Address. . . . . . . . . : XXXXXXXXXXXXXXXXXXXX
DHCP Enabled. . . . . . . . . . . : Yes
IPv4 Address. . . . . . . . . . . : 192.168.1.100
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.1.1
DNS Servers . . . . . . . . . . . : fe80::1%lo0, fe80::2%lo0, fe80::3%lo0, fe80::4%lo0, fe80::5%lo0, fe80::6%lo0, fe80::7%lo0, fe80::8%lo0, fe80::9%lo0, fe80::a%lo0, fe80::b%lo0, fe80::c%lo0, fe80::d%lo0, fe80::e%lo0, fe80::f%lo0, fe80::1%lo0, fe80::2%lo0, fe80::3%lo0, fe80::4%lo0, fe80::5%lo0, fe80::6%lo0, fe80::7%lo0, fe80::8%lo0, fe80::9%lo0, fe80::a%lo0, fe80::b%lo0, fe80::c%lo0, fe80::d%lo0, fe80::e%lo0, fe80::f%lo0
“`
Mac/Linux:
“`
enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::21c:29ff:fe9f:d3a6%enp2s0 permanent (Preferred)
inet6 fe80::21c:29ff:fe9f:d3a7%enp2s0 temporary (Preferred)
inet6 fe80::21c:29ff:fe9f:d3a6%enp2s0 prefaddr permanent (Preferred)
inet6 fe80::21c:29ff:fe9f:d3a7%enp2s0 prefaddr temporary (Preferred)
inet6 fe80::21c:29ff:fe9f:d3a6%enp2s0 valid_lft forever preferred_lft forever
inet6 fe80::21c:29ff:fe9f:d3a7%enp2s0 valid_lft forever preferred_lft forever
inet6 fe80::21c:29ff:fe9f:d3a6%enp2s0 preferred_lft forever
inet6 fe80::21c:29ff:fe9f:d3a7%enp2s0 preferred_lft forever
inet6 fe80::21c:29ff:fe9f:d3a6%enp2s0 active yes valid_lft forever preferred_lft forever
inet6 fe80::21c:29ff:fe9f:d3a7%enp2s0 active yes valid_lft forever preferred_lft forever
inet6 fe80::21c:29ff:fe9f:d3a6%enp2s0 source specific (Temporary) destination specific (Temporary) multicast address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group address not joined group adr