If systemd-resolved is active on your system and you want to create a symbolic link from /etc/resolv.conf to the file managed by systemd-resolved, you should follow these steps:
Backup your existing resolv.conf file (if necessary): Before making any changes, it's a good idea to back up your current resolv.conf file just in case you need to revert the changes.
bash Copy code sudo cp /etc/resolv.conf /etc/resolv.conf.backup Create a symbolic link to the systemd-resolved managed file: Use the ln command to create a symbolic link from /etc/resolv.conf to the file managed by systemd-resolved.
bash Copy code sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf Here, the -s flag specifies that you're creating a symbolic link, and the -f flag tells ln to overwrite the existing resolv.conf if it's already present.
Restart systemd-resolved: After creating the symbolic link, you might need to restart the systemd-resolved service for the changes to take effect.
bash Copy code sudo systemctl restart systemd-resolved By creating this symbolic link, you're allowing applications that rely on the /etc/resolv.conf file to use the DNS information managed by systemd-resolved.
Ke