Skip to content

Instantly share code, notes, and snippets.

@guneysus
Forked from zoilomora/README.md
Created December 9, 2023 10:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guneysus/6a7cfc073a1c07a681a0d056d3b33d66 to your computer and use it in GitHub Desktop.
Save guneysus/6a7cfc073a1c07a681a0d056d3b33d66 to your computer and use it in GitHub Desktop.
How to disable systemd-resolved in Ubuntu

How to disable systemd-resolved in Ubuntu

Stages

  • Disable and stop the systemd-resolved service:

      sudo systemctl disable systemd-resolved.service
      sudo systemctl stop systemd-resolved
    
  • Then put the following line in the [main] section of your /etc/NetworkManager/NetworkManager.conf:

      dns=default
    
  • Delete the symlink /etc/resolv.conf

      rm /etc/resolv.conf
    
  • Restart network-manager

      sudo service network-manager restart
      or
      sudo systemctl restart NetworkManager.service
    

Sources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment