Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
rb:ubuntu1804netplan [29/11/2019 01:28]
andrew [Basic static address]
rb:ubuntu1804netplan [03/04/2020 11:19] (current)
andrew [Updating resolv.conf]
Line 54: Line 54:
  
  
-.+ 
 +===== Updating resolv.conf ===== 
 + 
 +''/​etc/​resolv/​conf''​ is now a symlink as below:- 
 + 
 +<code bash> 
 +root@argon:​~#​ ls -l /​etc/​resolv.conf 
 +lrwxrwxrwx 1 root root 39 Apr  3 08:41 /​etc/​resolv.conf -> ../​run/​systemd/​resolve/​stub-resolv.conf 
 + 
 +root@argon:​~#​ ls -l /​run/​systemd/​resolve/​* 
 +-rw-r--r-- 1 systemd-resolve systemd-resolve 633 Apr  3 12:04 /​run/​systemd/​resolve/​resolv.conf 
 +-rw-r--r-- 1 systemd-resolve systemd-resolve 760 Apr  3 12:04 /​run/​systemd/​resolve/​stub-resolv.conf 
 +</​code>​ 
 + 
 +Two choices seem to exist, the resolv.conf file is the one updated by netplan, so let's use this:- 
 +<code bash> 
 +root@argon:​~#​ ln -s /​run/​systemd/​resolve/​resolv.conf /​etc/​resolv.conf 
 +ln: failed to create symbolic link '/​etc/​resolv.conf':​ File exists 
 +root@argon:​~#​ mv /​etc/​resolv.conf /​etc/​resolv.conf.orig 
 +root@argon:​~#​ ln -s /​run/​systemd/​resolve/​resolv.conf /​etc/​resolv.conf 
 +root@argon:​~#​ rm /​etc/​resolv.conf.orig 
 +</​code>​ 
 + 
 +You could just use ''​ln -sf''​ to force the link creation, but if something goes wrong, you loose the original file. 
 + 
 +Test with ''​dig''​ or ''​nslookup''​ and resolution should work as expected.
  

rb/ubuntu1804netplan.1574990906.txt.gz · Last modified: 29/11/2019 01:28 by andrew