What should I do if the ubuntu18.04 dsn is reset when it is restarted?

methods that have been tried so far

  1. modify / etc/resolvconf/resolv.conf.d/head
  2. modify / etc/resolvconf/resolv.conf.d/base
  3. modify / etc/resolvconf/resolv.conf.d/tail
  4. modify / etc/network/interfaces
  5. modify / etc/systemd/resolved.conf

but none of these methods work. My dsn is still reset after reboot. What should I do? I just came into contact with the linux system. I don"t understand.

Mar.15,2021

well, thank you, it has been solved.
sudo chattr + I / etc/resolv.conf
set the file to read-only, all right. I can't believe that's how it works.


speechless. 18 has changed routines to use netplan to manage network configuration instead of directly changing resolv.conf

configuration file in
/ etc/netplan/50-cloud-init.yaml
then restart the network with
sudo netplan apply

netplan is the system network configuration tool of ubt18. For more information, please see man netplan

.
Menu