Debian ping: google.com: Temporary failure in name resolution
Here is the solution.
Edit nano /etc/systemd/resolved.conf
, add following lines.
DNS=1.1.1.1
FallbackDNS=8.8.8.8
Run following commands.
systemctl enable systemd-resolved.service
systemctl stop systemd-resolved.service
systemctl start systemd-resolved.service
systemctl status systemd-resolved.service
This will print the status of service
● systemd-resolved.service - Network Name Resolution
Loaded: loaded (/lib/systemd/system/systemd-resolved.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2024-04-22 14:24:30 CST; 3s ago
Docs: man:systemd-resolved.service(8)
man:org.freedesktop.resolve1(5)
https://www.freedesktop.org/wiki/Software/systemd/writing-network-configuration-managers
https://www.freedesktop.org/wiki/Software/systemd/writing-resolver-clients
Main PID: 48211 (systemd-resolve)
Status: "Processing requests..."
Tasks: 1 (limit: 9488)
Memory: 4.1M
CPU: 115ms
CGroup: /system.slice/systemd-resolved.service
└─48211 /lib/systemd/systemd-resolved
Apr 22 14:24:30 aabbdde systemd[1]: Starting Network Name Resolution...
Apr 22 14:24:30 aabbdde systemd-resolved[48211]: Positive Trust Anchors:
Apr 22 14:24:30 aabbdde systemd-resolved[48211]: . IN DS 20326 8 2 e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104237c7f8ec8d
Apr 22 14:24:30 aabbdde systemd-resolved[48211]: Negative trust anchors: 10.in-addr.arpa 16.172.in-addr.arpa 17.172.in-addr.arpa 18.172.in-addr.arpa 19.172.in-addr.arpa 20.172.in-addr.arpa 21.172.in-addr.arpa 22.172.in-addr.arpa 23.172.in-addr.arpa 24.172.in-addr.arpa 25.172.in-addr.>
Apr 22 14:24:30 aabbdde systemd-resolved[48211]: Using system hostname 'aabbdde'.
Apr 22 14:24:30 aabbdde systemd[1]: Started Network Name Resolution.
Now, problem solved.
本作品采用 知识共享署名-相同方式共享 4.0 国际许可协议 进行许可。
评论已关闭