How to alter /etc/resolv.conf permanently ?

Hello guys,

for some time I try to find a away to alter /etc/resolv.conf file permanetly but I can't find none.
Everytime my computer reboots Mac OSX the changes the file.

I saw in a post that someone sugests to use the command:
sudo networksetup -setdnsservers "Built-in Ethernet" 1.2.3.4
But that command (networksetup) doesn't exist.

Any ideas?

Mac OS X (10.4.8)

Mac OS X (10.4.8)

Intel iMac Mac OS X (10.4.8)

Posted on May 22, 2007 11:50 AM

Reply
6 replies

May 22, 2007 1:17 PM in response to jb.morgado

networksetup is here:

/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Support/netw orksetup

I make a link to it from /usr/sbin which is in my login PATH so I can use it from the shell.

I'm not sure why, but my /etc/resolv.conf seems to persist. Perhaps I ran System Preferences and it read it in and stored it somewhere. It's a mystery to me. Another thought is to try and put a line in /etc/rc to unlink resolv.conf and link to let's say resolv.conf.O, but I'm unsure of the order of things at the moment.

May 22, 2007 3:35 PM in response to jb.morgado

It's a little strange. I've got my router in resolv.conf too, but it doesn't show up in network preferences. A little while back I had a problem where the router stopped working as a nameserver. I just put it at the bottom of resolv.conf, and it's stayed there, over reboots. Even though it's a link to /var/run/resolv.conf. I'm slightly baffled, although it's fine by me.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to alter /etc/resolv.conf permanently ?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.