野声

Hey, 野声!

谁有天大力气可以拎着自己飞呀
twitter
github

MacOS "Regenerate" /etc/resolv.conf

I accidentally deleted /etc/resolv.conf while setting up my local DNS server, and restarting multiple times didn't help restore it.

After some searching, I found out that /etc/resolv.conf is just a symbolic link to /var/run/resolv.conf.

soft link

Solution#

So the solution is simple:

sudo ln -s /var/run/resolv.conf /etc/resolv.conf

Reference#

  1. How to force MacOS to regenerate /etc/resolv.conf file?
Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.