7

I am trying to do OSX's internet sharing from the command line and there doesn't seem to be a command for it, so I'm trying to do it manually by turning the network card to access point mode. I can't seem to find anything about how to turn the wireless card into AP mode on the mac. Linux would use iwconfig (which OSX doesn't have) and I've monitored the files that network sharing opens, but no dice so far.

It looks related to wifid, but the documentation for wifid only says "Don't invoke wifid directly". Also played with the airportd command, but it doesn't seem to let the card go into AP mode. There must be a way to do it, since internet sharing creates an access point.

TL;DR:Does anyone know how to turn on Internet Sharing from the command line?

7
  • If you downvote, please explain why in the comments.
    – syzygy
    Aug 12, 2015 at 23:26
  • 1
    The way in which it used to be done doesn't appear to work anymore...
    – l'L'l
    Aug 13, 2015 at 1:19
  • Well, thanks for looking anyway :(
    – syzygy
    Aug 13, 2015 at 1:27
  • You might get a better response on superuser.com serverfault.com or networkengineering.stackexchange.com Aug 13, 2015 at 1:47
  • @SnakeCharmer: There is a way to toggle the InternetSharing preference on/off then turn Wi-Fi on/off, and load/unload the daemon, although it seems a bit dicey in the way it works (or doesn't).
    – l'L'l
    Aug 13, 2015 at 2:13

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.