Difference between revisions of "Networksetup"

From wikieduonline
Jump to navigation Jump to search
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
{{lc}}
 
<code>networksetup</code><ref>https://www.unix.com/man-page/osx/8/NETWORKSETUP/</ref> is a [[macOS]] configuration command for network settings.
 
<code>networksetup</code><ref>https://www.unix.com/man-page/osx/8/NETWORKSETUP/</ref> is a [[macOS]] configuration command for network settings.
  
 
+
* <code>[[networksetup -listallnetworkservices]]</code>
* <code>networksetup -listallnetworkservices</code>
+
* <code>[[networksetup -listnetworkserviceorder]]</code> (includes [[interface names]])
  
  
 
Change [[DNS]] services: <code>networksetup -setdnsservers Network_Service_Name YOU.RDNS.IP</code>
 
Change [[DNS]] services: <code>networksetup -setdnsservers Network_Service_Name YOU.RDNS.IP</code>
* <code>networksetup -setdnsservers Wi-Fi 8.8.8.8</code>
+
* <code>[[networksetup -setdnsservers]] Wi-Fi 8.8.8.8</code>
 
* <code>networksetup -setdnsservers "USB 10/100/1000 LAN" 8.8.8.8 1.1.1.1</code>
 
* <code>networksetup -setdnsservers "USB 10/100/1000 LAN" 8.8.8.8 1.1.1.1</code>
 
::Check configuration: <code>[[scutil|scutil --dns]]</code>
 
::Check configuration: <code>[[scutil|scutil --dns]]</code>
Line 13: Line 14:
 
* <code>networksetup -setsearchdomains Wi-Fi example.com</code>
 
* <code>networksetup -setsearchdomains Wi-Fi example.com</code>
 
::Check configuration: <code>[[scutil|scutil --dns]]</code>
 
::Check configuration: <code>[[scutil|scutil --dns]]</code>
 +
* <code>networksetup -setsearchdomains "USB 10/100/1000 LAN" example.com</code>
 +
::Check configuration: <code>[[scutil|scutil --dns]] | grep "search domain"</code>
 +
 +
* <code>[[networksetup -listnetworkserviceorder]]</code>
 +
 +
[[VPN]]
 +
* <code>[[networksetup -connectpppoeservice]] "myVPN"</code>
  
 
== Activities ==
 
== Activities ==
 
* Create an IP alias in [[macOS]]: https://apple.stackexchange.com/questions/296647/how-do-i-create-a-static-permanent-ifconfig-alias
 
* Create an IP alias in [[macOS]]: https://apple.stackexchange.com/questions/296647/how-do-i-create-a-static-permanent-ifconfig-alias
 
* [[Renew DHCP address in your macOS from command line]]
 
* [[Renew DHCP address in your macOS from command line]]
 +
 +
== Related ==
 +
* <code>[[ipconfig getifaddr en0]]</code>
 +
* <code>[[ifconfig]]</code>
  
 
== See also ==
 
== See also ==
 +
* {{networksetup}}
 
* {{macOS networking}}
 
* {{macOS networking}}
* {{macOS}}
 
* {{DNS}}
 
  
  
 
[[Category:macOS]]
 
[[Category:macOS]]

Latest revision as of 16:10, 18 December 2023

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


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

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"

VPN

Activities[edit]

Related[edit]

See also[edit]

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