Thursday, December 16, 2010

Mac command line DNS

Sometimes I wish to set DNS settings for Mac from the command line.

Here is a way I found to get this accomplished:

Start Terminal application:



sudo networksetup <-gets help
sudo networksetup -setdnsservers Airport <DNSServer IP> 
sudo networksetup -setsearchdomains Airport <like example.com >

No comments:

Post a Comment