Difference between revisions of "Networksetup"

From wikieduonline
Jump to navigation Jump to search
Line 12: Line 12:
 
* <code>networksetup -setsearchdomains Ethernet example.com</code>
 
* <code>networksetup -setsearchdomains Ethernet example.com</code>
 
* <code>networksetup -setsearchdomains Wi-Fi example.com</code>
 
* <code>networksetup -setsearchdomains Wi-Fi example.com</code>
 +
::Check configuration: <code>[[scutil|scutil --dns]]</code>
 
* <code>networksetup -setsearchdomains "USB 10/100/1000 LAN" example.com</code>
 
* <code>networksetup -setsearchdomains "USB 10/100/1000 LAN" example.com</code>
::Check configuration: <code>[[scutil|scutil --dns]]</code>
+
::Check configuration: <code>[[scutil|scutil --dns]] | grep "search domain"</code>
  
 
== Activities ==
 
== Activities ==

Revision as of 05:34, 22 January 2020

networksetup[1] is a macOS configuration command for network settings.


  • networksetup -listallnetworkservices


Change DNS services: networksetup -setdnsservers Network_Service_Name YOU.RDNS.IP

  • networksetup -setdnsservers Wi-Fi 8.8.8.8
  • networksetup -setdnsservers "USB 10/100/1000 LAN" 8.8.8.8 1.1.1.1
Check configuration: scutil --dns
  • networksetup -setsearchdomains Ethernet example.com
  • networksetup -setsearchdomains Wi-Fi example.com
Check configuration: scutil --dns
  • networksetup -setsearchdomains "USB 10/100/1000 LAN" example.com
Check configuration: scutil --dns | grep "search domain"

Activities

See also

  • https://www.unix.com/man-page/osx/8/NETWORKSETUP/
  • Advertising: