Skip to main content

fedora 39 change dns

ben.wangzLess than 1 minute

fedora 39 change dns

concepts

  1. in fedora 39, /etc/resolve.conf is managed by systemd-resolved

how

  1. edit /etc/systemd/resolved.conf
    • sudo vi /etc/systemd/resolved.conf
      
    • add/modify DNS=223.5.5.5
  2. restart systemd-resolved
    • sudo systemctl restart systemd-resolved
      
  3. check
    • systemd-resolve --status
      
    • #nslookup www.google.com.hk
      nslookup www.baidu.com