stop systemd-resolved getting /etc/resolv.conf messed

If you want to manually set the DNS servers on your Ubuntu system without NetworkManager automatically generating the `/etc/resolv.conf` file, you can follow these steps: 1. Open the `/etc/resolv.conf` file using a text editor with root privileges. For example, you can use the following command in the terminal: ``` sudo nano /etc/resolv.conf ``` 2. Clear the existing contents of the file. 3. Add the IP addresses of the DNS servers you want to use. Each nameserver should be specified on a separate line. For example: ``` nameserver 8.8.8.8 nameserver 8.8.4.4 ``` In the above example, the DNS servers `8.8.8.8` and `8.8.4.4` are used. You can replace them with the IP addresses of the DNS servers you prefer. 4. Save the changes to the `/etc/resolv.conf` file and exit the text editor. 5. To prevent NetworkManager from overwriting the file, you can create a symbolic link from `/etc/resolv.conf` to `/run/resolvconf/resolv.conf`. Run the following command in the terminal: ``` sudo ln -s /run/resolvconf/resolv.conf /etc/resolv.conf ``` 6. Restart the networking service to apply the changes: ``` sudo service networking restart ``` By following these steps, you should be able to manually set the DNS servers and prevent NetworkManager from automatically generating the `/etc/resolv.conf` file.