Is it possible to create a Ad-hoc Wifi network in OS X using the command line? Without using Apple Script to do it through the UI.
Is it possible to create a Ad-hoc Wifi network in OS X using the command line? Without using Apple Script to do it through the UI.
I've used
sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -i[<arg>]
to do the job. Take a look at/usr/sbin/networksetup
to round out the solution.As a newer answer for making an ad hoc network that works in Mojave without a internet connection, while searching online, I finally found an answer!
Smoooosher's answer only works with an active connection to share.
To create your own "active" network, in terminal run the 2 following commands.
This creates a new network conection that although it looks inactive, it can be shared from the internet sharing preference pane to wifi.