how to quickly reboot from OSX to Windows and back

From Windows back to OSX is fairly easy. What I would like is a few less steps to get from OSX to Windows. Currently I launch system preferences -> startup disk - then select the bootcamp partition and press restart.

Being completely new to OSX it seems to me that a one-click action on the dock should be possible with some sort of automation scripting. Howerver I know nothing about OSX (yet) and how that works. First, is such a thing possible, and second please provide some tutoral links for such automation system.

• What was the "fairly easy" way from windows? Just opening the bootcamp tray? – noelicus Jan 28 '15 at 9:36
• @noelicus Yes, right click the bootcamp icon and pick Reboot in OS X. It may be interesting to know that since this original post I have moved away from bootcamp to parallels (which on a late 2013 iMac (32GB ram, 3TB fusion etc...) it's really a much better environment. Now just a two finger swipe back and forth between the two Operating systems. – Ralph Shillington Jan 28 '15 at 11:29
• It seems there's no way of doing a "boot once to OS X". That bootcamp menu in windows seems to change the permanent start-up. On another note, I have installed parallels also. Very cool, but slower than a native boot! – noelicus Jan 28 '15 at 15:50

Note: This does not work on systems with System Integrity Protection enabled

Write a shell script that does this

#!/bin/sh
# tell OSX to change the boot disk
# nextonly just for the next time - without the default would be Windows
/usr/sbin/bless -mount /Volumes/BOOTCAMP --setBoot  --nextonly
# reboot
/sbin/shutdown -r now


This can be called from a terminal window

sudo bootcamp


The use Automator to call this via an apple script and save as an application

on run {input, parameters}

do shell script "/Users/mark/bin/bootcamp" with administrator privileges

return input
end run

• Just keep in mind that when you click on this script, you wont have the chance to save any unsaved work from any application. The system WILL reboot your machine whatever the cost! – nuc Mar 3 '11 at 21:36
• Shouldn't it be --mount /Volumes/BOOTCAMP --setBoot --nextonly (notice double dashes before parameters)? – Aldekein Nov 15 '14 at 20:41
• Can someone verify that this works on OSX 10.10 or greater? Even with the double dashes it doesn't work for me (just restarts into OSX). I've verified that the command doesn't throw any errors by running it directly on the command line and verified that /Volumes/BOOTCAMP exists. – davertron Jan 31 '16 at 15:42
• I'm also unable to get it to work on macOS 10.12.2. When I invoke sudo bless --mount /Volumes/BOOTCAMP --setBoot --nextonly, I get the error Could not set boot device property: 0xe00002bc. Seems the issue is SIP. – Jason R. Coombs Dec 27 '16 at 19:30
• This no longer works due to System Integrity Protection. See this and @celestialroad's answer to this question. – Timmmm Jul 13 '17 at 9:18

Hold while booting, you'll get a prompt to choose which OS / drive you want to boot from!

• This is not what he asked, it's definitely not "quick" nor "automated" nor "one-click". – o0'. Mar 3 '11 at 16:54
• @looris sometimes there's no need to re-invent the wheel.. – nuc Mar 3 '11 at 21:37
• @nuc With 38K views, I'd say there is. Lohoris has the right of it. – bpcookson Aug 23 '15 at 20:16
• The question was "What I would like is a few less steps to get from OSX to Windows." This solves the problem easily (exactly what I was looking for when I found this question), doesn't require new software, or scripting. – crimbo Oct 1 '15 at 15:16

Another way to get from OS X to Windows quickly is to use Bootchamp, which adds a menu bar item like this:

For my Windows-booting needs Bootchamp has worked well.

(I learned about it from a similar question on Super User I once asked.)

Here is an Automator workflow I wrote to accomplish rebooting to Bootcamp automatically:

https://github.com/ryanmcginnis/Restart-to-Bootcamp

As of El Capitan, it is no longer possible to programmatically set the startup disk, even with SIP disabled.

• This is a nice and simple solution. Works great. Thanks! – Staysee Dec 30 '16 at 2:02

It seems this script from SuperUser handles the closing of open windows (and stopping the scheduled restart if user presses 'cancel'):

do shell script "hdiutil unmount /Volumes/<Windows_Partition> -quiet"
do shell script "bless -device /dev/disk0s3 -legacy -setBoot -nextonly" with administrator privileges
tell application "Finder" to restart


I'm really fond of rEFIt.

rEFIt is a boot menu and maintenance toolkit for EFI-based machines like the Intel Macs. You can use it to boot multiple operating systems easily, including triple-boot setups with Boot Camp. It also provides an easy way to enter and explore the EFI pre-boot environment.

The OP seems to be interested about an OSX-to-Windows only command, so I guess this is not exactly what he wants. Still, I find rEFIt much easier to work with: if I want to go from one OS to another, I just need to reboot and then choose the OS I want.

And if you ever need to work with 3 (or more) OS'es, you will see rEFIT is a much better option...

It also allows you to boot up from an external hard drive or a pen drive, which is a very nice bonus.

Edit From the rEFIt page:

2013-03-29: As you may have noticed, rEFIt is no longer actively maintained. Please check out rEFInd, a fork that is maintaned and under active development.

Quick boot does it nicely. It's in the menu bar.

http://www.macupdate.com/app/mac/25414/quickboot

I wanted to use AppleScript instead of BootChamp since I had a problems with an always-running webapp when it resumed state when returning to OS X instead of launching regularly. Trying to bless the volume from an AppleScript did not work on my iMac with a 3TB fusion drive so rebooting after the bless would lead to an error screen "NO BOOTABLE DEVICE - INSERT BOOT DISC AND PRESS ANY KEY".

What I had to do was bless the HDD's EFI disk id with the -device switch, mount the BootCamp volume with the -mount switch and skip the -legacy switch. For me the HDD's EFI partition disk id was disk1s1 but you can verify yours by running diskutil list in terminal and look for the EFI device from the HDD (not the SSD).

I also wanted to do a "clean" restart so my applications would not resume when returning to OS X so I created an AppleScript that quits specific apps before continuing to the bless and reboot:

try
repeat with thisApp in apps
tell application thisApp to quit
end repeat
end try

delay 2