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

# Generated by resolvconf

OS is raspbian buster on raspberry pi 4.

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

  • Did you add the hostname to the /etc/dhcpcd.conf? – M. Rostami Jan 31 at 0:19
  • No i just set new hostname on the resolv.conf and don't know why it happen. – Lymia Jan 31 at 0:21
  • This is normal Linux operation. Why do you think you have to change it? – Milliways Jan 31 at 0:29
  • @Milliways My dns server has problems on the local network and i have to change dns server. – Lymia Jan 31 at 0:32
  • DO NOT add detail in Comments; edit your question. "My dns server has problems on the local network" is meaningless. People will suggest solutions, but unless you clarify the problem may just waste your time. See How to set up networking/WiFi How to set up Static IP Address – Milliways Jan 31 at 0:37

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=  

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.

| improve this answer | |
  • Thank you I set and save the file but it not solved. – Lymia Jan 31 at 0:45
  • 1
    Ah yes. i reboot raspberry its worked. – Lymia Jan 31 at 0:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.