DNS client on Linux:
- /etc/resolv.conf specifies the nameservers for resolver lookups. The order of lookup is sequential and accordance to DNS protocol. Local and global DNS entries are added here. Please be advised that these settings could be overwritten by system updates and even reboots. The proper way of inserting persistent DNS records onto resolv.conf isvim /etc/resolvconf/resolv.conf.d/head >> insert a record such as: nameserver [LOCAL_DNS_IP] >> save file: wq + enter >> Regenerate resolv.config with: sudo resolvconf -u
- /etc/hosts file is typically used for only administrative purposes and internal network functions of limited scope. Singular entries associating names with IPs are sometimes added here.
- /etc/nsswitch.conf specifies the lookup order, to be used in conjunction with the hosts entry.
- /etc/network/interfaces is the manual IP Address configuration method (typically for servers). Here is a sample of an edit of this file:iface eth0 inet staticaddress 10.10.30.Xnetmask 255.255.255.0gateway 10.10.30.1dns-search kimconnect.comdns-nameservers 10.10.20.1 10.10.20.2
Lastly, any changes to network configurations should be followed by this command: service network-manager restart