snippetbashTip
networksetup — Configuration tool for Network System Preferences. More information: <https://support.apple.com/guid
Viewed 0 times
configurationcommandnetworksetupnetworkclitoolforsystem
macos
Problem
How to use the
networksetup command: Configuration tool for Network System Preferences. More information: <https://support.apple.com/guide/remote-desktop/about-networksetup-apdd0c5a2d5/mac>.Solution
networksetup — Configuration tool for Network System Preferences. More information: <https://support.apple.com/guide/remote-desktop/about-networksetup-apdd0c5a2d5/mac>.List available network service providers (Ethernet, Wi-Fi, Bluetooth, etc):
networksetup -listallnetworkservicesShow network settings for a particular networking device:
networksetup -getinfo "{{Wi-Fi}}"Get currently connected Wi-Fi network name (Wi-Fi device usually en0 or en1):
networksetup -getairportnetwork {{en0}}Connect to a particular Wi-Fi network:
networksetup -setairportnetwork {{en0}} {{Airport Network SSID}} {{password}}Code Snippets
List available network service providers (Ethernet, Wi-Fi, Bluetooth, etc)
networksetup -listallnetworkservicesShow network settings for a particular networking device
networksetup -getinfo "{{Wi-Fi}}"Get currently connected Wi-Fi network name (Wi-Fi device usually en0 or en1)
networksetup -getairportnetwork {{en0}}Connect to a particular Wi-Fi network
networksetup -setairportnetwork {{en0}} {{Airport Network SSID}} {{password}}Context
tldr-pages: osx/networksetup
Revisions (0)
No revisions yet.