Recently, I found a raspberry pie that has been eating ash for many years 3b, It's a waste to be idle , How about a group Nextcloud Used as a network disk . As a result, domain name resolution always fails in the process of use , Raspberry pie is connected to the home router WiFi.
First, I try to modify vi /etc/resolv.conf
file , add to nameserver 114.114.114.114
To solve , After modification, the problem of domain name resolution is indeed solved , But it was finally found that the raspberry pie would fail after restarting .
What's a good way to solve it ?
Actually, it needs to be modified resolved.conf file
sudo vi /etc/systemd/resolved.conf
Then delete DNS= The comment symbol on that line , Add DNS The address of the server , Here I am. 114.114.114.114 For example , After modification, it is :
DNS=114.114.114.114
After the save , Restart again , Observe DNS Whether to take effect .
If you want to modify other DNS The server , Such as 8.8.8.8, Then modify it accordingly .