All apps/networksetup

networksetup

networksetup

Configuration tool for network settings in System Settings.

Runs as networksetup|macOS

Command form

ai-draft · 3 tasks · 5 fields

Inspect a network service, set its DNS servers, or switch Wi-Fi power. Run it with sudo where macOS requires it.

Opens the form; the finished command lands at your prompt, unrun
otty gui networksetup

networksetup -getinfo

Show service info

IP address, subnet mask, router and hardware address of a service.

Show service infoExample values, fixed in this page — nothing here reaches a terminal
Basic
Network service*
string
TasksEach one presets the form for one job
Show info
service
ParametersOnly these flags are editable in the form
Network service
string · positional 0
Wi-FiEthernet

networksetup -setdnsservers

Set DNS servers

Use "empty" in place of a server to clear all DNS entries.

Set DNS serversExample values, fixed in this page — nothing here reaches a terminal
Basic
Network service*
string
DNS servers*
string
TasksEach one presets the form for one job
Set DNS
servicedns
ParametersOnly these flags are editable in the form
Network service
string · positional 0
Wi-FiEthernet
DNS servers
string · positional 1 · repeatable
empty

networksetup -setairportpower

Wi-Fi power

Turn Wi-Fi power on or off for a hardware port.

Wi-Fi powerExample values, fixed in this page — nothing here reaches a terminal
Basic
Hardware port*
string
Power*
2 choicesenum
TasksEach one presets the form for one job
Set Wi-Fi power
portstate
ParametersOnly these flags are editable in the form
Hardware port
string · positional 0
en0
Power
enum · positional 1
onoff
SourcesEvery flag above is checked against these
fig
completion

github.com

fig
completion

github.com

fig
completion

github.com

fig
completion

github.com

Before it fills your prompt, Otty checks the installed networksetup against its version. A form that does not match your version is not offered.