Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

"Airplane mode" for OS X Network
A reader at Stack Exchange asked an interesting question about whether it was possible to set up an "airplane mode" for OS X. The idea was to ensure that there is no network activity through any possible network interfaces.

It's actually pretty simple to do this. If you go to the Network pane of System Preferences, you'll see a Location popup menu at the top of the window. Click on that menu and choose Edit Locations. Click on the + icon to add a new location, then enter a name, such as AirplaneMode. Click on Done.

Next, choose that location in the Location menu, and click on each available network interface in the list at the left of the window. Click on the Configure iPv4 menu, and choose Off. For Wi-Fi, just click on the Turn Wi-Fi Off button. Click Apply, and this location will block all network activity.

To activate the location, there are two ways. You can click on the Apple menu, then Location, and choose the location. Or, if you wish to do this from the command line, as the poster had requested, you can run this command:

networksetup -switchtolocation AirplaneMode

Replace AirplaneMode with the name you've chosen for the location.

Using airplane mode can be useful if you're worried about security when using a laptop in public places. It can also save battery power, as Wi-Fi will go off, and your Mac will no longer search for networks.
    •    
  • Currently 2.91 / 5
  You rated: 2 / 5 (11 votes cast)
 
[12,841 views]  

"Airplane mode" for OS X | 17 comments | Create New Account
Click here to return to the '"Airplane mode" for OS X ' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
"Airplane mode" for OS X
Authored by: deemery on Mar 25, '13 07:58:09AM

NOT Sufficient! You also have to disable Bluetooth to match "Airplane mode" and to meet the 'no radiation' requirement.

This is one of those things where I miss the old Location Manager. There are 3rd party add-ons that will do more than what you can do in the Networks panel.



[ Reply to This | # ]
"Airplane mode" for OS X
Authored by: rpoland on Mar 25, '13 08:21:02AM

Neat idea. Too bad it wasn't verified on Mountian Lion. Besides not matching the preference screen, it doesn't work.



[ Reply to This | # ]
"Airplane mode" for OS X
Authored by: zoff on Mar 25, '13 09:10:21AM

scselect works in Mountain Lion. For example if you have a location named AirplaneMode, the following will switch to it or am I missing something?

scselect AirplaneMode



[ Reply to This | # ]
"Airplane mode" for OS X
Authored by: rpoland on Mar 25, '13 09:12:52AM

For me when I set WiFi ON/OFF in any mode it is switched in ALL modes.



[ Reply to This | # ]
"Airplane mode" for OS X
Authored by: kirkmc on Mar 25, '13 09:30:04AM

So tell me what doesn't match, because I did test it on Mountain Lion, and it did work, and the preferences are exactly as I described...

---
Mac OS X Hints editor - Macworld senior contributor
http://www.mcelhearn.com



[ Reply to This | # ]
"Airplane mode" for OS X
Authored by: rpoland on Mar 25, '13 09:35:18AM

"Click on the Configure iPv4 menu" Doesn't exist on my machines.
iMac Mid 2011, 12,2
2.7 GHz Intel Core I5, 27”
12 GB Ram, 1TB HD
OS X 10.8.3 (12D78)
MacBook Pro 15" Early 2008, 4,1
2.4 GHz Intel Core 2 Duo
4 GB Ram
OWC 3G SSD 240GB
OS X 10.8.3 (12D78)



[ Reply to This | # ]
"Airplane mode" for OS X
Authored by: cybergoober on Mar 25, '13 02:20:10PM

I think you missed clicking the "Advanced..." button, then clicking the TCP/IP tab of the resulting sheet. That will reveal the "Configure IPv4" drop-down.



[ Reply to This | # ]
"Airplane mode" for OS X
Authored by: kirkmc on Mar 25, '13 11:12:27PM

Nope, it's there when I click on any interface other than Wi-Fi, Bluetooth or VPN.

---
Mac OS X Hints editor - Macworld senior contributor
http://www.mcelhearn.com



[ Reply to This | # ]
1 problem, 1 update
Authored by: magnamous on Mar 28, '13 11:13:04PM

In OS 10.8.3, I don't have a Location item in the Apple Menu, so switching locations via that method doesn't seem to be available.

Also, in 10.8.3, I tried creating a new location and then simply deleting all of the various network interfaces from the list on the left. When I clicked "Apply", my Wi-Fi turned off and my Bluetooth stayed off (it was off before), so seemingly this works, too. If anyone can confirm to the contrary, let me know.

Anyway, this is useful to me. Thanks!



[ Reply to This | # ]
1 problem, 1 update
Authored by: magnamous on Mar 29, '13 12:19:46AM

Found this, too:

How to simplify choosing Network Locations with AppleScript

I set it as a service available everywhere (requiring no input).



[ Reply to This | # ]
"Airplane mode" for OS X
Authored by: waffffffle on Mar 25, '13 08:46:51AM

There is a Mac App Store app that does this properly, disabling both Bluetooth and Wi-Fi: http://itunes.apple.com/jo/app/airplane-setting/id470661452?mt=12



[ Reply to This | # ]
"Airplane mode" for OS X
Authored by: zoff on Mar 25, '13 09:02:06AM

Not available in the US store.



[ Reply to This | # ]
"Airplane mode" for OS X
Authored by: mmhappy on Mar 25, '13 02:09:26PM
http://flavr.fi/OPS Another victim of "Apple’s requirement that all apps must be sandboxed".

[ Reply to This | # ]
"Airplane mode" for OS X
Authored by: BiL Castine on Mar 26, '13 06:44:03AM
This is fairly easy to automate with Control Plane. (not affiliated, just a satisfied user)

[ Reply to This | # ]
"Airplane mode" for OS X
Authored by: bdm on Mar 26, '13 07:23:19AM

I'm skeptical . If I'm in a location with Wifi on, and then switch to the new mode, Wifi remains turned on (recent 12" retina MBP, 10.8.3). Even though I turned it off when I created the location and also deleted all services from the location. It isn't connected to a network, but it is turned on. How do we know that is enough to satisfy the rules for airplane mode?



[ Reply to This | # ]
"Airplane mode" for OS X
Authored by: bdm on Mar 26, '13 04:07:10PM

Ooops, please scratch my comment. Now it works. Sorry about the false alarm.



[ Reply to This | # ]
"Airplane mode" for OS X
Authored by: metiure on Mar 26, '13 11:10:17AM

A simple AS to toogle AirPort command. Change your interface accordingly:

-- Toggle Airport Power On and Off
--
if (offset of "On" in (do shell script "networksetup -getairportpower en1")) > 0 then
do shell script "networksetup -setairportpower en1 off"
else
do shell script "networksetup -setairportpower en1 on"
end if



[ Reply to This | # ]