4

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.

2 Answers 2

3

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.

0

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.

sudo networksetup -createnetworkservice Loopback lo0
sudo networksetup -setmanual Loopback 172.20.42.42 255.255.255.255

This creates a new network conection that although it looks inactive, it can be shared from the internet sharing preference pane to wifi.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .