How to Change The CentOS DNS Server?

How to Change The CentOS DNS Server?

This topic is about how to change the CentOS DNS server. This article shows some steps to help you change your Cent OS DNS server.

CentOS is a powerful and popular Linux distribution. Changing the DNS server on CentOS is relatively easy and can be done in a few steps.

In this context, we will show you how to change DNS server on CentOS. We will cover both graphical and command-line methods.

How to Change The Cent OS DNS Server

If you want to change your Cent OS DNS server, you need to follow a few steps.

1. First, you need to open the /etc/resolv.conf file in a text editor (Nano or VI).

nano /etc/resolv.conf

vi /etc/resolv.conf

2. Next, locate the line starting with “nameserver” and replace the following IP address with the IP address of the new DNS server.

nameserver 8.8.8.8
nameserver 192.168.1.1

3. And the last step, save your changes and exit from the text editor. Go there to get it last here!

Conclusion

We hope this article helped you change your Cent OS DNS server. If you have any questions or comments, please drop them below. If you have other tips or tricks for changing Cent OS DNS servers, we’d love to hear from you.

Scroll to Top