careyjames
Posts: 17
Joined: Mon Nov 16, 2015 10:40 pm
Contact: Website

sudo sh -c 'echo "nameserver 8.8.8.8" >> /etc/resolv.conf' worked for me but did not survive a reboot.

Fri Jul 19, 2019 12:54 am

sudo sh -c 'echo "nameserver 8.8.8.8" >> /etc/resolv.conf'

worked for me but did not survive a reboot.

it went back to 192.168.2.1

i noticed the default ip addess when i do ifconfig is 192.168.2.2 where is that coming from?

my /etc/network/interfaces only has one line, so where is it getting the 192.168.2.2 from????
betta fsck yourself before you wreck yo self.

Andyroo
Posts: 4206
Joined: Sat Jun 16, 2018 12:49 am
Location: Lincs U.K.

Re: changes on /etc/resolve.conf not getting saved upon reboot

Fri Jul 19, 2019 2:16 am

/etc/resolve.conf is designed to be built up at boot time and NOT designed to be edited.

To add nameservers in you could either edit /etc/resolvconf/resolv.conf.d/base (if present) or add the data to /etc/dhcpcd.conf

I’ve now moved my settings (static IP etc) to dhcpcd.conf
Need Pi spray - these things are breeding in my house...

Return to “General discussion”