Difference between revisions of "Networksetup"
Jump to navigation
Jump to search
↑ https://www.unix.com/man-page/osx/8/NETWORKSETUP/
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{lc}} | {{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> | ||
Line 19: | Line 18: | ||
* <code>[[networksetup -listnetworkserviceorder]]</code> | * <code>[[networksetup -listnetworkserviceorder]]</code> | ||
+ | |||
+ | [[VPN]] | ||
+ | * <code>[[networksetup -connectpppoeservice]] "myVPN"</code> | ||
== Activities == | == Activities == | ||
Line 26: | Line 28: | ||
== Related == | == Related == | ||
* <code>[[ipconfig getifaddr en0]]</code> | * <code>[[ipconfig getifaddr en0]]</code> | ||
+ | * <code>[[ifconfig]]</code> | ||
== See also == | == See also == |
Latest revision as of 16:10, 18 December 2023
networksetup
[1] is a macOS configuration command for network settings.
networksetup -listallnetworkservices
networksetup -listnetworkserviceorder
(includes interface names)
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
- Check configuration:
networksetup -setsearchdomains Ethernet example.com
networksetup -setsearchdomains Wi-Fi example.com
- Check configuration:
scutil --dns
- Check configuration:
networksetup -setsearchdomains "USB 10/100/1000 LAN" example.com
- Check configuration:
scutil --dns | grep "search domain"
- Check configuration:
Activities[edit]
- 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
Related[edit]
See also[edit]
networksetup, networksetup -setdnsservers
,networksetup -listallnetworkservices
,networksetup -listnetworkserviceorder, -listallhardwareports
- macOS:
networksetup
,ifconfig
,ipconfig [ getifaddr ]
,scutil
Advertising: