DNS determines whether a server can reach the internet via domain names. There are two ways to configure DNS server IP addresses on Linux.
Verification method:
| |
Temporary method
a) Edit resolv.conf1vi ./etc/resolv.confb) Enter
1nameserver 8.8.8.8Save and you’re done.
Permanent method
a) Edit ifcfg-eth01vi /etc/sysconfig/network-scripts/ifcfg-eth0b) Enter
1DNS1=8.8.8.8Save and you’re done.
You can use
| |
to view the local network interfaces, where you can see the eth0 configuration information.