How to change DNS resolver in centos 8

  1. Create a file, such as /etc/resolv.conf.manually-configured, and add the DNS configuration for your environment to it. Use the same parameters and syntax as in the original /etc/resolv.conf.

  2. Remove the /etc/resolv.conf file:
# rm /etc/resolv.conf

Create a symbolic link named /etc/resolv.conf that refers to /etc/resolv.conf.manually-configured:

# ln -s /etc/resolv.conf.manually-configured /etc/resolv.conf

Please rate this article to help us improve our Knowledge Base.

0 0