sobierski

networksetup

Dec 30th, 2018
312
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 18.96 KB | None | 0 0
  1. Mac-F23:~ jager$ networksetup -help
  2.  
  3. networksetup Help Information
  4. -------------------------------
  5. Usage: networksetup -listnetworkserviceorder
  6.     Display services with corresponding port and device in order they are tried for connecting
  7.     to a network. An asterisk (*) denotes that a service is disabled.
  8.  
  9. Usage: networksetup -listallnetworkservices
  10.     Display list of services. An asterisk (*) denotes that a network service is disabled.
  11.  
  12. Usage: networksetup -listallhardwareports
  13.     Display list of hardware ports with corresponding device name and ethernet address.
  14.  
  15. Usage: networksetup -detectnewhardware
  16.     Detect new network hardware and create a default network service on the hardware.
  17.  
  18. Usage: networksetup -getmacaddress <hardwareport or device name>
  19.     Display ethernet (or Wi-Fi) address for hardwareport or device specified.
  20.  
  21. Usage: networksetup -getcomputername
  22.     Display the computer name.
  23.  
  24. Usage: networksetup -setcomputername <name>
  25.     Set the computer's name (if valid) to <name>.
  26.  
  27. Usage: networksetup -getinfo <networkservice>
  28.     Display IPv4 address, IPv6 address, subnet mask,
  29.     router address, ethernet address for <networkservice>.
  30.  
  31. Usage: networksetup -setmanual <networkservice> <ip> <subnet> <router>
  32.     Set the <networkservice> TCP/IP configuration to manual with IP address set to ip,
  33.     Subnet Mask set to subnet, and Router address set to router.
  34.  
  35. Usage: networksetup -setdhcp <networkservice> [clientid]
  36.     Set the <networkservice> TCP/IP configuration to DHCP. You can set the
  37.     DHCP client id to the optional [clientid]. Specify "Empty" for [clientid]
  38.     to clear the DHCP client id.
  39.  
  40. Usage: networksetup -setbootp <networkservice>
  41.     Set the <networkservice> TCP/IP configuration to BOOTP.
  42.  
  43. Usage: networksetup -setmanualwithdhcprouter <networkservice> <ip>
  44.     Set the <networkservice> TCP/IP configuration to manual with DHCP router with IP address set
  45.     to ip.
  46.  
  47. Usage: networksetup -getadditionalroutes <networkservice>
  48.     Get additional IPv4 routes associated with <networkservice>
  49. Usage: networksetup -setadditionalroutes <networkservice> [ <dest> <mask> <gateway> ]*
  50.     Set additional IPv4 routes associated with <networkservice>
  51.     by specifying one or more [ <dest> <mask> <gateway> ] tuples.
  52.     Remove additional routes by specifying no arguments.
  53.     If <gateway> is "", the route is direct to the interface
  54. Usage: networksetup -setv4off <networkservice>
  55.     Turn IPv4 off on <networkservice>.
  56.  
  57. Usage: networksetup -setv6off <networkservice>
  58.     Turn IPv6 off on <networkservice>.
  59.  
  60. Usage: networksetup -setv6automatic <networkservice>
  61.     Set the service to get its IPv6 info automatically.
  62.  
  63. Usage: networksetup -setv6LinkLocal <networkservice>
  64.     Set the service to use its IPv6 only for link local.
  65.  
  66. Usage: networksetup -setv6manual <networkservice> <address> <prefixlength> <router>
  67.     Set the service to get its IPv6 info manually.
  68.     Specify <address> <prefixLength> and <router>.
  69.  
  70. Usage: networksetup -getv6additionalroutes <networkservice>
  71.     Get additional IPv6 routes associated with <networkservice>
  72. Usage: networksetup -setv6additionalroutes <networkservice> [ <dest> <prefixlength> <gateway> ]*
  73.     Set additional IPv6 routes associated with <networkservice>
  74.     by specifying one or more [ <dest> <prefixlength> <gateway> ] tuples.
  75.     Remove additional routes by specifying no arguments.
  76.     If <gateway> is "", the route is direct to the interface
  77. Usage: networksetup -getdnsservers <networkservice>
  78.     Display DNS info for <networkservice>.
  79.  
  80. Usage: networksetup -setdnsservers <networkservice> <dns1> [dns2] [...]
  81.     Set the <networkservice> DNS servers to <dns1> [dns2] [...]. Any number of dns servers can be
  82.     specified. Specify "Empty" for <dns1> to clear all DNS entries.
  83.  
  84. Usage: networksetup -getsearchdomains <networkservice>
  85.     Display Domain Name info for <networkservice>.
  86.  
  87. Usage: networksetup -setsearchdomains <networkservice> <domain1> [domain2] [...]
  88.     Set the <networkservice> Domain Name servers to <domain1> [domain2] [...]. Any number of Domain Name
  89.     servers can be specified. Specify "Empty" for <domain1> to clear all Domain Name entries.
  90.  
  91. Usage: networksetup -create6to4service <newnetworkservicename>
  92.     Create a 6 to 4 service with name <newnetworkservicename>.
  93.  
  94. Usage: networksetup -set6to4automatic <networkservice>
  95.     Set the service to get its 6 to 4 info automatically.
  96.  
  97. Usage: networksetup -set6to4manual <networkservice> <relayaddress>
  98.     Set the service to get its 6 to 4 info manually.
  99.     Specify <relayaddress> for the relay address.
  100.  
  101. Usage: networksetup -getftpproxy <networkservice>
  102.     Display FTP proxy (server, port, enabled value) info for <networkservice>.
  103.  
  104. Usage: networksetup -setftpproxy <networkservice> <domain> <port number> <authenticated> <username> <password>
  105.     Set FTP 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.
  106.  
  107. Usage: networksetup -setftpproxystate <networkservice> <on off>
  108.     Set FTP proxy to  either <on> or <off>.
  109.  
  110. Usage: networksetup -getwebproxy <networkservice>
  111.     Display Web proxy (server, port, enabled value) info for <networkservice>.
  112.  
  113. Usage: networksetup -setwebproxy <networkservice> <domain> <port number> <authenticated> <username> <password>
  114.     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.
  115.  
  116. Usage: networksetup -setwebproxystate <networkservice> <on off>
  117.     Set Web proxy to  either <on> or <off>.
  118.  
  119. Usage: networksetup -getsecurewebproxy <networkservice>
  120.     Display Secure Web proxy (server, port, enabled value) info for <networkservice>.
  121.  
  122. Usage: networksetup -setsecurewebproxy <networkservice> <domain> <port number> <authenticated> <username> <password>
  123.     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.
  124.  
  125. Usage: networksetup -setsecurewebproxystate <networkservice> <on off>
  126.     Set SecureWeb proxy to  either <on> or <off>.
  127.  
  128. Usage: networksetup -getstreamingproxy <networkservice>
  129.     Display Streaming proxy (server, port, enabled value) info for <networkservice>.
  130.  
  131. Usage: networksetup -setstreamingproxy <networkservice> <domain> <port number> <authenticated> <username> <password>
  132.     Set Streaming 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.
  133.  
  134. Usage: networksetup -setstreamingproxystate <networkservice> <on off>
  135.     Set Streaming proxy to  either <on> or <off>.
  136.  
  137. Usage: networksetup -getgopherproxy <networkservice>
  138.     Display Gopher proxy (server, port, enabled value) info for <networkservice>.
  139.  
  140. Usage: networksetup -setgopherproxy <networkservice> <domain> <port number> <authenticated> <username> <password>
  141.     Set Gopher 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.
  142.  
  143. Usage: networksetup -setgopherproxystate <networkservice> <on off>
  144.     Set Gopher proxy to  either <on> or <off>.
  145.  
  146. Usage: networksetup -getsocksfirewallproxy <networkservice>
  147.     Display SOCKS Firewall proxy (server, port, enabled value) info for <networkservice>.
  148.  
  149. Usage: networksetup -setsocksfirewallproxy <networkservice> <domain> <port number> <authenticated> <username> <password>
  150.     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.
  151.  
  152. Usage: networksetup -setsocksfirewallproxystate <networkservice> <on off>
  153.     Set SOCKS Firewall proxy to  either <on> or <off>.
  154.  
  155. Usage: networksetup -getproxybypassdomains <networkservice>
  156.     Display Bypass Domain Names for <networkservice>.
  157.  
  158. Usage: networksetup -setproxybypassdomains <networkservice> <domain1> [domain2] [...]
  159.     Set the Bypass Domain Name Servers for <networkservice> to <domain1> [domain2] [...]. Any number of
  160.     Domain Name servers can be specified. Specify "Empty" for <domain1> to clear all
  161.     Domain Name entries.
  162.  
  163. Usage: networksetup -getproxyautodiscovery <networkservice>
  164.     Display whether Proxy Auto Discover is on or off for <network service>.
  165.  
  166. Usage: networksetup -setproxyautodiscovery <networkservice> <on off>
  167.     Set Proxy Auto Discovery to either <on> or <off>.
  168.  
  169. Usage: networksetup -getpassiveftp <networkservice>
  170.     Display whether Passive FTP is on or off for <networkservice>.
  171.  
  172. Usage: networksetup -setpassiveftp <networkservice> <on off>
  173.     Set Passive FTP to either <on> or <off>.
  174.  
  175. Usage: networksetup -setautoproxyurl <networkservice> <url>
  176.     Set proxy auto-config to url for <networkservice> and enable it.
  177.  
  178. Usage: networksetup -getautoproxyurl <networkservice>
  179.     Display proxy auto-config (url, enabled) info for <networkservice>.
  180.  
  181. Usage: networksetup -setautoproxystate <networkservice> <on off>
  182.     Set proxy auto-config to either <on> or <off>.
  183.  
  184. Usage: networksetup -getairportnetwork <device name>
  185.     Display current Wi-Fi Network for <device name>.
  186.  
  187. Usage: networksetup -setairportnetwork <device name> <network> [password]
  188.     Set Wi-Fi Network to <network> for <device name>.
  189.     If a password is included, it gets stored in the keychain.
  190.  
  191. Usage: networksetup -getairportpower <device name>
  192.     Display whether Wi-Fi power is on or off for <device name>.
  193.  
  194. Usage: networksetup -setairportpower <device name> <on off>
  195.     Set Wi-Fi power for <device name> to either <on> or <off>.
  196.  
  197. Usage: networksetup -listpreferredwirelessnetworks <device name>
  198.     List the preferred wireless networks for <device name>.
  199.  
  200. Usage: networksetup -addpreferredwirelessnetworkatindex <device name> <network> <index> <security type> [password]
  201.     Add wireless network named <network> to preferred list for <device name> at <index>.
  202.     For security type, use OPEN for none, WPA for WPA Personal, WPAE for WPA Enterprise,
  203.     WPA2 for WPA2 Personal, WPA2E for WPA2 Enterprise, WEP for plain WEP, and 8021XWEP for 802.1X WEP.
  204.     If a password is included, it gets stored in the keychain.
  205.  
  206. Usage: networksetup -removepreferredwirelessnetwork <device name> <network>
  207.     Remove <network> from the preferred wireless network list for <device name>.
  208.  
  209. Usage: networksetup -removeallpreferredwirelessnetworks <device name>
  210.     Remove all networks from the preferred wireless network list for <device name>.
  211.  
  212. Usage: networksetup -getnetworkserviceenabled <networkservice>
  213.     Display whether a service is on or off (enabled or disabled).
  214.  
  215. Usage: networksetup -setnetworkserviceenabled <networkservice> <on off>
  216.     Set <networkservice> to either <on> or <off> (enabled or disabled).
  217.  
  218. Usage: networksetup -createnetworkservice <newnetworkservicename> <hardwareport>
  219.     Create a service named <networkservice> on port <hardwareport>. The new service will be enabled by default.
  220.  
  221. Usage: networksetup -renamenetworkservice <networkservice> <newnetworkservicename>
  222.     Rename <networkservice> to <newnetworkservicename>.
  223.  
  224. Usage: networksetup -duplicatenetworkservice <networkservice> <newnetworkservicename>
  225.     Duplicate <networkservice> and name it with <newnetworkservicename>.
  226.  
  227. Usage: networksetup -removenetworkservice <networkservice>
  228.     Remove the service named <networkservice>. Will fail if this is the only service on the hardware port that <networkservice> is on.
  229.  
  230. Usage: networksetup -ordernetworkservices <service1> <service2> <service3> <...>
  231.     Order the services in order specified. Use "-listnetworkserviceorder" to view service order.
  232.     Note: use quotes around service names which contain spaces (ie. "Built-in Ethernet").
  233.  
  234. Usage: networksetup -setMTUAndMediaAutomatically <hardwareport or device name>
  235.     Set hardwareport or device specified back to automatically setting the MTU and Media.
  236.  
  237. Usage: networksetup -getMTU <hardwareport or device name>
  238.     Get the MTU value for hardwareport or device specified.
  239.  
  240. Usage: networksetup -setMTU <hardwareport or device name> <value>
  241.     Set MTU for hardwareport or device specified.
  242.  
  243. Usage: networksetup -listvalidMTUrange <hardwareport or device name>
  244.     List the valid MTU range for hardwareport or device specified.
  245.  
  246. Usage: networksetup -getmedia <hardwareport or device name>
  247.     Show both the current setting for media and the active media on hardwareport or device specified.
  248.  
  249. Usage: networksetup -setmedia <hardwareport or device name> <subtype> [option1] [option2] [...]
  250.     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.
  251.  
  252. Usage: networksetup -listvalidmedia <hardwareport or device name>
  253.     List valid media options for hardwareport or device name. Enumerates available subtypes and options per subtype.
  254.  
  255. Usage: networksetup -createVLAN <VLAN name> <device name> <tag>
  256.     Create a VLAN with name <VLAN name> over device <device name> with unique tag <tag>. A default network service will be created over the VLAN.
  257.  
  258. Usage: networksetup -deleteVLAN <VLAN name> <device name> <tag>
  259.     Delete the VLAN with name <VLAN name> over the parent device <device name> with unique tag <tag>. If there are network services running over the VLAN they will be deleted.
  260.  
  261. Usage: networksetup -listVLANs
  262.     List the VLANs that have been created.
  263.  
  264. Usage: networksetup -listdevicesthatsupportVLAN
  265.     List the devices that support VLANs.
  266.  
  267. Usage: networksetup -isBondSupported <device name ie., en0>
  268.     Return YES if the specified device can be added to a bond. NO if it cannot.
  269.  
  270. Usage: networksetup -createBond <user defined name> <device name 1> <device name 2> <...>
  271.     Create a new bond and give it the user defined name. Add the specified devices, if any, to the bond.
  272.  
  273. Usage: networksetup -deleteBond <bond name ie., bond0>
  274.     Delete the bond with the specified device-name.
  275.  
  276. Usage: networksetup -addDeviceToBond <device name> <bond name>
  277.     Add the specified device to the specified bond.
  278.  
  279. Usage: networksetup -removeDeviceFromBond <device name> <bond name>
  280.     Remove the specified device from the specified bond
  281.  
  282. Usage: networksetup -listBonds
  283.     List all of the bonds.
  284.  
  285. Usage: networksetup -showBondStatus <bond name ie., bond0>
  286.     Display the status of the specified bond.
  287.  
  288. Usage: networksetup -listpppoeservices
  289.     List all of the PPPoE services in the current set.
  290.  
  291. Usage: networksetup -showpppoestatus <service name ie., MyPPPoEService>
  292.     Display the status of the specified PPPoE service.
  293.  
  294. Usage: networksetup -createpppoeservice <device name ie., en0> <service name> <account name> <password> [pppoe service name]
  295.     Create a PPPoE service on the specified device with the service name specified.
  296.     The "pppoe service name" is optional and may not be supported by the service provider.
  297.  
  298. Usage: networksetup -deletepppoeservice <service name>
  299.     Delete the PPPoE service.
  300.  
  301. Usage: networksetup -setpppoeaccountname <service name> <account name>
  302.     Sets the account name for the specified service.
  303.  
  304. Usage: networksetup -setpppoepassword <service name> <password>
  305.     Sets the password stored in the keychain for the specified service.
  306.  
  307. Usage: networksetup -connectpppoeservice <service name>
  308.     Connect the PPPoE service.
  309.  
  310. Usage: networksetup -disconnectpppoeservice <service name>
  311.     Disconnect the PPPoE service.
  312.  
  313. Usage: networksetup -getcurrentlocation
  314.     Display the name of the current location.
  315.  
  316. Usage: networksetup -listlocations
  317.     List all of the locations.
  318.  
  319. Usage: networksetup -createlocation <location name> [populate]
  320.     Create a new network location with the spcified name.
  321.     If the optional term "populate" is included, the location will be populated with the default services.
  322.  
  323. Usage: networksetup -deletelocation <location name>
  324.     Delete the location.
  325.  
  326. Usage: networksetup -switchtolocation <location name>
  327.     Make the specified location the current location.
  328.  
  329. Usage: networksetup -listalluserprofiles
  330.     Display the names of all of the user profiles.
  331.  
  332. Usage: networksetup -listloginprofiles <service name>
  333.     Display the names of the loginwindow profiles for the specified service.
  334.  
  335. Usage: networksetup -enablesystemprofile <service name> <on off>
  336.     Enables or disables the system profile for the specified service.
  337.  
  338. Usage: networksetup -enableloginprofile <service name> <profile name> <on off>
  339.     Enables or disables the specified loginwindow profile for the specified service.
  340.  
  341. Usage: networksetup -enableuserprofile <profile name> <on off>
  342.     Enables or disables the specified user profile.
  343.  
  344. Usage: networksetup -import8021xProfiles <service name> <file path>
  345.     Imports the 802.1x profiles for the specified service.
  346.  
  347. Usage: networksetup -export8021xProfiles <service name> <file path> <include keychain items: yes no>
  348.     Exports all of the profiles for the specified service.
  349.     If the last parameter is yes, it will include the items from the keychain.
  350.  
  351. Usage: networksetup -export8021xUserProfiles <file path> <include keychain items: yes no>
  352.     Exports only the user profiles.
  353.  
  354.     If the last parameter is yes, it will include the items from the keychain.
  355.  
  356. Usage: networksetup -export8021xLoginProfiles <service name> <file path> <include keychain items: yes no>
  357.     Exports only the loginwindow profiles for the specified service.
  358.  
  359.     If the last parameter is yes, it will include the items from the keychain.
  360.  
  361. Usage: networksetup -export8021xSystemProfile <service name> <file path> <include keychain items: yes no>
  362.     Exports only the system profile for the specified service.
  363.  
  364.     If the last parameter is yes, it will include the items from the keychain.
  365.  
  366. Usage: networksetup -settlsidentityonsystemprofile <service name> <file path> <passphrase>
  367.     Sets the TLS identity on the system profile for the specified service.
  368.  
  369.     The identity must be a pkcs12 file.
  370.  
  371. Usage: networksetup -settlsidentityonuserprofile <profile name> <file path> <passphrase>
  372.     Sets the TLS identity on the specified user profile.
  373.  
  374.     The identity must be a pkcs12 file.
  375.  
  376. Usage: networksetup -deletesystemprofile <service name>
  377.     Deletes the system profile for the specified service.
  378.  
  379. Usage: networksetup -deleteloginprofile <service name> <profile name>
  380.     Deletes the specified loginwindow profile for the specified service.
  381.  
  382. Usage: networksetup -deleteuserprofile <profile name>
  383.     Deletes the specified user profile.
  384.  
  385. Usage: networksetup -version
  386.     Display version of networksetup tool.
  387.  
  388. Usage: networksetup -help
  389.     Display these help listings.
  390.  
  391. Usage: networksetup -printcommands
  392.     Displays a quick listing of commands (without explanations).
  393.  
  394. Any command that takes a password, will accept - to indicate the password should be read from stdin.
Add Comment
Please, Sign In to add comment