All apps/networksetup

networksetup

networksetup

Configuration tool for network settings in System Settings.

Runs as networksetup|macOS

Autocomplete

Fig spec, with what the manifest adds · 92 subcommands
Published once and never changed; check the digest before caching
sha256
80569c8a3e9ee54a5bd885ed294ba83c9a8de632b64981d2c6e858178f7261c4
Size
44209 bytes
Subcommands92 subcommands
networksetup -listnetworkserviceorder
Displays a list of network services in the order they are contacted for a connection, along with the corresponding port and device for each
networksetup -listallnetworkservices
Displays a list of all the network services on the server's hardware ports
networksetup -listallhardwareports
Displays list of hardware ports with corresponding device name and ethernet address
networksetup -detectnewhardware
Detects new network hardware and creates a default network service on the hardware
networksetup -getmacaddress
Displays ethernet (or Wi-Fi) address for hardwareport or device specified
networksetup -getcomputername
Displays the computer name
networksetup -setcomputername
Sets computer name to <computername>. This name is used by AFP
networksetup -getinfo
Displays the IP address, subnet mask, router, and hardware address for the <networkservice> that you specify
networksetup -setmanual
Set the TCP/IP configuration for <networkservice> to manual with IP address set to <ip>, Subnet Mask set to <subnet>, and Router address set to <router>
networksetup -setdhcp
Use this command to set the TCP/IP configuration for the specified <networkservice> to use DHCP. The client ID is optional. Specify "Empty" for [clientid] to clear the DHCP client id
networksetup -setbootp
Use this command to set the TCP/IP configuration for the specified <networkservice> to use BOOTP
networksetup -setmanualwithdhcprouter
Use this command to specify a manual IP address to use for DHCP for the specified <networkservice>
networksetup -getadditionalroutes
Use this command to display the list of additional IPv4 routes configured for the service
networksetup -setadditionalroutes
Use this command to set the list of IPv4 additional routes configured for the service. Each route is specified as a (destination address, subnet mask, gateway address) tuple. Specifying no tuples clears the list of routes
networksetup -setv4off
Use this command to turn IPv4 off on the specified <networkservice>
networksetup -setv6off
Use this command to turn IPv6 off on the specified <networkservice>
networksetup -setv6automatic
Use this command to set IPv6 to get its addresses automatically for <networkservice>
networksetup -setv6linklocal
Use this command to set IPv6 to only use link local for <networkservice>
networksetup -setv6manual
Use this command to set IPv6 to get its addresses manually for <networkservice>. Specify the ip address, the prefix length and the router
networksetup -getv6additionalroutes
Use this command to display the list of additional IPv6 routes configured for the service
networksetup -setv6additionalroutes
Use this command to set the list of additional routes configured for the service. Each route is specified as a (destination address, prefix length, gateway address) tuple. Specifying no tuples clears the list of routes
networksetup -getdnsservers
Displays DNS info for <networkservice>
networksetup -setdnsservers
Use this command to specify the IP addresses of servers you want the specified <networkservice> to use to resolve domain names. You can list any number of servers (replace dns1, dns2, and so on with the IP addresses of domain name servers). If you want to clear all DNS entries for the specified network service, type "empty" in place of the DNS server names
networksetup -getsearchdomains
Displays Domain Name info for <networkservice>
networksetup -setsearchdomains
Use this command to designate the search domain for the specified <networkservice>. You can list any number of search domains (replace domain1, domain2, and so on with the name of a local domain). If you want to clear all search domain entries for the specified network service, type “empty” in place of the domain name
networksetup -create6to4service
Use this command to create a new 6 to 4 service with name <newnetworkservicename>
networksetup -set6to4automatic
Use this command to set the 6 to 4 service such that it will get the relay address automatically
networksetup -set6to4manual
Use this command to set the 6 to 4 service such that it will get the relay address manually. Specify the <relayaddress> that you would like to set
networksetup -getwebproxy
Displays Web proxy (server, port, enabled value) info for <networkservice>
networksetup -setwebproxy
Set Web proxy for <networkservice> with <domain> and <port number>. Turns proxy on. Optionally, specify <on> or <off> for <authenticated> to enable and disable authenticated proxy support. Specify <username> and <password> if you turn authenticated proxy support on
networksetup -setwebproxystate
Set Web proxy on <networkservice> to either <on> or <off>
networksetup -getsecurewebproxy
Displays Secure Web proxy (server, port, enabled value) info for <networkservice>
networksetup -setsecurewebproxy
Set Secure Web proxy for <networkservice> with <domain> and <port number>. Turns proxy on. Optionally, specify <on> or <off> for <authenticated> to enable and disable authenticated proxy support. Specify <username> and <password> if you turn authenticated proxy support on
networksetup -setsecurewebproxystate
Set Secure Web proxy on <networkservice> to either <on> or <off>
networksetup -getsocksfirewallproxy
Displays SOCKS Firewall proxy (server, port, enabled value) info for <networkservice>
networksetup -setsocksfirewallproxy
Set SOCKS Firewall proxy for <networkservice> with <domain> and <port number>. Turns proxy on. Optionally, specify <on> or <off> for <authenticated> to enable and disable authenticated proxy support. Specify <username> and <password> if you turn authenticated proxy support on
networksetup -setsocksfirewallproxystate
Set SOCKS Firewall proxy to either <on> or <off>
networksetup -getproxybypassdomains
Displays Bypass Domain Names for <networkservice>
networksetup -setproxybypassdomains
Set the Bypass Domain Name Servers for <networkservice> to <domain1> [domain2] [...]. Any number of Domain Name servers can be specified. Specify "Empty" for <domain1> to clear all Domain Name entries
networksetup -getproxyautodiscovery
Displays Proxy Auto Discover for <networkservice>
networksetup -setproxyautodiscovery
Set Proxy Auto Discover for <networkservice> to either <on> or <off>
networksetup -setautoproxyurl
Set proxy auto-config to url for <networkservice> and enable it
networksetup -getautoproxyurl
Displays proxy auto-config (url, enabled) info for <networkservice>
networksetup -getairportnetwork
Displays current Wi-Fi Network
networksetup -setairportnetwork
Set Wi-Fi Network to <network> using optional [password] if specified
networksetup -getairportpower
Displays whether Wi-Fi power is on or off
networksetup -setairportpower
Set Wi-Fi power to either <on> or <off>
networksetup -listpreferredwirelessnetworks
List the preferred wireless networks for <hardwareport>
networksetup -addpreferredwirelessnetworkatindex
Add wireless network named <network> to preferred list for <hardwareport> at <index>. Store the optional password in the keychain
networksetup -removepreferredwirelessnetwork
Remove <network> from the preferred wireless network list for <hardwareport>
networksetup -removeallpreferredwirelessnetworks
Remove all networks from the preferred wireless network list for <hardwareport>
networksetup -getnetworkserviceenabled
Displays whether a service is on or off (enabled or disabled)
networksetup -setnetworkserviceenabled
Use this command to turn the specified network service on or off (enable or disable)
networksetup -createnetworkservice
Create a service named <networkservice> on port <hardwareport>. The new service will be enabled by default
networksetup -renamenetworkservice
Use this command to rename the specified network service <networkservice> to <newnetworkservicename>
networksetup -duplicatenetworkservice
Use this command to duplicate an existing network service <networkservice> and rename it to the specified name <newnetworkservicename>
networksetup -removenetworkservice
Use this command to delete a network service <networkservice>. You cannot use this command to delete the last remaining service for a hardware port. To do so, you use the -setnetworkserviceenabled command
networksetup -ordernetworkservices
Use this command to designate the order network services are contacted on the specified hardware port. Name the network you want contacted first, then the second, and so on. Use "listnetworkserviceorder" to view current service order. Note: use quotes around service names which contain spaces (ie. "Built-in Ethernet")
networksetup -setMTUAndMediaAutomatically
Set hardwareport or device specified back to automatically setting the MTU and Media
networksetup -getMTU
Get the MTU value for hardwareport or device specified
networksetup -setMTU
Set MTU for hardwareport or device specified
networksetup -listValidMTURange
List the valid MTU range for hardwareport or device specified
networksetup -getMedia
Show both the current setting for media and the active media on hardwareport or device specified
networksetup -setMedia
Set media for hardwareport or device specified to subtype. Specify optional [option1] and additional options depending on subtype. Any number of valid options can be specified
networksetup -listValidMedia
List valid media options for hardwareport or device name. Enumerates available subtypes and options per subtype
networksetup -createVLAN
Create a VLAN with the name <name> over the parent device <parentdevice> and with the tag <tag>
networksetup -deleteVLAN
Delete the VLAN with the name <name> over the parent device <parentdevice> and with the tag <tag>
networksetup -listVLANs
List the VLANs that have been created
networksetup -listdevicesthatsupportVLAN
List the devices that support VLANs
networksetup -isBondSupported
Displays YES if the device can be added to a bond. NO if it cannot
networksetup -createBond
Create a bond with the user-defined-name name and optionally add any listed devices if they support bonding
networksetup -deleteBond
Delete the bond with the specified device-name
networksetup -addDeviceToBond
Add device to bond
networksetup -removeDeviceFromBond
Remove device from bond
networksetup -listBonds
List of all bonds
networksetup -showBondStatus
Display the status of the specified bond
networksetup -listpppoeservices
List all PPPoE services in the current set
networksetup -showpppoestatus
Display the status of the PPPoE service with the specified name
networksetup -createpppoeservice
Create a PPPoE service on the specified device with the service name specified
networksetup -deletepppoeservice
Delete the service
networksetup -setpppoeaccountname
Set the account name for the service
networksetup -setpppoepassword
Set the password for the service
networksetup -connectpppoeservice
Connect the service
networksetup -disconnectpppoeservice
Disconnect the service
networksetup -listlocations
List all network locations
networksetup -getcurrentlocation
Display the name of the current set
networksetup -createlocation
Create a set with the user-defined-name name and optionally populate it with the default services
networksetup -deletelocation
Delete the set
networksetup -switchtolocation
Make the specified set the current set
networksetup -version
Displays version of networksetup tool
networksetup -help
Displays a list of all the commands available in the Network Setup Tool, with explanatory information
networksetup -printcommands
Displays a list of commands with no detail