0

I add new hostname to the /etc/resolve.conf but it reset after I reboot Raspberry pi.

# Generated by resolvconf
nameserver 8.8.8.8

OS is raspbian buster on raspberry pi 4.

Edit: I have to change my dns server because it has problems on the local network.

Lymia
  • 23
  • 2
  • 6

1 Answers1

1

You shouldn't manually update the resolv.conf, because all changes will be overwritten by data that your local DHCP server provides. Therefore, the network manager of Raspbian Buster has configured by /etc/dhcpcd.conf. Every configuration of this config file always is overwriting to other network config files on the OS.

All you need is that you should config your network by /etc/dhcpcd.conf as you want. In this case, follow this procedure:

nano /etc/dhcpcd.conf  

Then, add this line:

static domain_name_servers=4.2.2.4 8.8.8.8  

Before Raspbian Strech (I'm not sure enough), you could do that. It's some difference we have here and you must follow them to configure the network.

M. Rostami
  • 4,323
  • 1
  • 17
  • 36