Skip to content

Instantly share code, notes, and snippets.

@zldrobit
Forked from zoilomora/README.md
Last active October 3, 2023 17:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save zldrobit/0b35215016031b91d040617ab7c8ff92 to your computer and use it in GitHub Desktop.
Save zldrobit/0b35215016031b91d040617ab7c8ff92 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 --now systemd-resolved.service		
    
  • 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 systemctl restart NetworkManager.service
    

Sources

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