Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

How to set DNS server in Linux

📅 2015-Feb-11 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ dns, nameserver ⬩ 📚 Archive

Domain Name Server (DNS) resolver or nameserver is a server that your computer talks with to convert domain names to IP addresses. If you are using DHCP on your computer, these servers are typically configured automatically for you. If you want to set a static IP address for your computer, you can set the DNS servers in the GUI of most Linux systems like Ubuntu for example.

The DNS servers are listed in the /etc/resolv.conf file. You can set them manually by editing this file and adding one line for each DNS server.

For example, to add the OpenDNS IP addresses, I add these lines to the file:

nameserver 208.67.222.222
nameserver 208.67.220.220

Tried with: Raspbian 7


© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 @codeyarns@hachyderm.io📧