DNS

使用 resolvectl 临时指定 DNS 服务器

在日常运维中,我们经常需要临时切换 DNS 服务器来排查域名解析问题。传统做法是修改 /etc/resolv.conf,但在使用 systemd-resolved 的现代 Linux 发行版中,resolvectl 提供了更优雅的解决方案。