ubuntu:networking:dns:etc_resolv.conf
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ubuntu:networking:dns:etc_resolv.conf [2021/01/10 20:57] – peter | ubuntu:networking:dns:etc_resolv.conf [2021/01/13 11:05] (current) – [Display /etc/resolv.conf] peter | ||
---|---|---|---|
Line 7: | Line 7: | ||
* **/ | * **/ | ||
* If DNS resolver changes are needed then do this through systemd. | * If DNS resolver changes are needed then do this through systemd. | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== List / | ||
+ | |||
+ | <code bash> | ||
+ | ls -al / | ||
+ | </ | ||
+ | |||
+ | returns: | ||
+ | |||
+ | <code bash> | ||
+ | lrwxrwxrwx 1 root root 32 Jan 10 18:50 / | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | |||
+ | It may instead be a symlink to **/ | ||
+ | |||
+ | If not then to fix try: | ||
+ | |||
+ | <code bash> | ||
+ | sudo ln -sf / | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Display / | ||
+ | |||
+ | <code bash> | ||
+ | cat / | ||
+ | </ | ||
+ | |||
+ | returns: | ||
+ | |||
+ | <code bash> | ||
+ | # This file is managed by man: | ||
+ | # | ||
+ | # This is a dynamic resolv.conf file for connecting local clients directly to | ||
+ | # all known uplink DNS servers. This file lists all configured search domains. | ||
+ | # | ||
+ | # Third party programs must not access this file directly, but only through the | ||
+ | # symlink at / | ||
+ | # replace this symlink by a static file or a different symlink. | ||
+ | # | ||
+ | # See man: | ||
+ | # operation for / | ||
+ | |||
+ | nameserver 192.168.1.1 | ||
+ | search localdomain | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | |||
+ | Usually it would only show as 192.168.1.1 or similar if DNS changes had been made in networking settings; such as in / | ||
+ | |||
</ | </ | ||
Line 50: | Line 111: | ||
* For a static configuration using ifup, use **dns-nameservers** and **dns-search** entries in / | * For a static configuration using ifup, use **dns-nameservers** and **dns-search** entries in / | ||
* For a static configuration using NetworkManager, | * For a static configuration using NetworkManager, | ||
+ | * If using netplan, set the DNS within **/ | ||
* To override resolvconf' | * To override resolvconf' | ||
Line 58: | Line 120: | ||
---- | ---- | ||
- | ===== This no longer works ===== | ||
- | |||
- | <WRAP danger> | ||
- | **DANGER**: | ||
- | </ | ||
- | |||
- | |||
- | The **resolv.conf** file typically contains the IP addresses of nameservers (DNS name resolvers) that attempt to translate names into addresses for any node available on the network. | ||
- | |||
- | Edit the / | ||
- | |||
- | <code bash> | ||
- | vi / | ||
- | </ | ||
- | |||
- | Add the nameservers as follows: | ||
- | |||
- | <file bash / | ||
- | search sharewiz.net | ||
- | nameserver 5.42.134.35 | ||
- | nameserver 8.8.8.8 | ||
- | nameserver 8.8.4.4 | ||
- | </ | ||
- | |||
- | <WRAP info> | ||
- | **NOTE**: | ||
- | </ | ||
- | |||
- | |||
- | ---- | ||
===== Test ===== | ===== Test ===== |
ubuntu/networking/dns/etc_resolv.conf.1610312243.txt.gz · Last modified: 2021/01/10 20:57 by peter