I am searching for a solution to automatically connect my MacBook Air to my iPhone hotspot. I don't like to connect manually every time. Is there any way to connect automatically.

Can I write a shell script file which will try to connect to my Hotspot so that I can add that task to system startup? Does that work? Is there any command to connect to a hotspot?


After connecting to the iPhone AP you should go in Network Preference and enable "Automatically join this network", as shown in the picture. You may also want to click "Advanced" and move the AP to change its priority (for example if you are at home you want the Mac to connect to your home's WiFi and not to the phone. So you should put the iPhone AP below the one at home - and/or work if any).

I have enabled it myself, but for some reasons it didn't seem to stick. Right now, again in "Advanced", I have deleted the "RedPlanet" AP, applied the changes, connected my MBP to my iPhone again re-enabling the "Automatically Join" flag.

That should be it, hopefully, unless being a connection from a mobile phone (thus with a data plan) macOS treats it differently (or if it is bugged. It worked randomly in the last couple of days that I enabled it)

enter image description here

  • 1
    Worked for me! This should be the accepted answer. – doc_id Jul 28 '19 at 1:11
  • 2
    Does not work on MacOS 10.14 – M. Anthony Aiello Oct 27 '19 at 4:17
  • Does not work for 10.15.x – Bohemian Nov 24 '20 at 22:22

While you cannot connect automatically, you can streamline the process by using these directions from Apple:

Use Instant Hotspot with any Mac, iPhone, iPad, or iPod touch that meets the Continuity system requirements. It works when your devices are near each other and set up as follows:

  • Your iPhone or iPad (Wi-Fi + Cellular) has an activated carrier plan providing Personal Hotspot service.
  • Each device is signed in to iCloud with the same Apple ID.
  • Each device has Bluetooth turned on.
  • Each device has Wi-Fi turned on.

To connect to your Personal Hotspot:

  • On Mac, use the Wi-Fi status menu in the menu bar to choose the name of the iPhone or iPad providing your Personal Hotspot.
  • On iPad, iPod touch, or even another iPhone, go to Settings > Wi-Fi, then tap the name of the iPhone or iPad providing your Personal Hotspot.

If you're asked for a password when connecting, make sure that your devices are set up as described above. The Wi-Fi status icon in the menu bar shows the Personal Hotspot icon as long as your device remains connected to your Personal Hotspot.


You can't connect to WiFi hotspot, but anyway you can automatically connect to hotspot via cable.

  • Connect iPhone, open Network preferences
  • Drag & Drop iPhone USB on the top
  • Uncheck Disable unless needed


  • I am posting this from my MBP connected to the Internet through my iPhone via WiFi. No need for password either, since both devices use the same iCloud ID by @drivec – Michele Dall'Agata Dec 7 '18 at 9:18

You must log in to answer this question.

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