Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to put my AirPort in access point mode, so it creates an infrastructure (ie, non-ad-hoc) network from the command line on OS X?

Similar to using System Preferences -> Sharing -> Internet -> Share from … to computers using WiFi.

share|improve this question
This won't answer your question but might be of interest: /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resource‌​s/airport – Max Ried Dec 31 '12 at 6:55
Unfortunately airport doesn't seem to do anything related. In fact, airport -s doesn't show anything when running in hostap mode. – David Wolever Dec 31 '12 at 7:40

After some hours of digging through the internet, it seems that the only way to put an airport in HostAP ("software base station") mode in OS X 10.8 Mountain Lion is to programatically call a the internal, undocumented, startHostAPModeWithSSID method.

I've updated the one example I could find online, and it does seem to work, with the one caveat that only WEP, not WPA, can be used:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.