How to Change the Mac Startup Disk From the Command Line

Although you can change the startup disk from the System Preferences window in Mac OS X 10.9 Mavericks, there are times when you may need to change it from the Terminal. For example, you can incorporate this function into a more complex UNIX shell script that is configured to maintain backups of your disks by imaging them. The Terminal gives you access to the UNIX system, so it can be a dangerous tool if you don't know what you're doing.

Male hand on laptop keyboard
credit: Poike/iStock/Getty Images

Use the Bless Command


Click the magnifying glass icon at the top of the Mac screen to display the Spotlight dialog box, type "Terminal" and then click "Terminal" in the list of results to launch the Terminal utility.


Type "sudo bless -mount /Volumes/Startup_Disk_Name -setBoot" without the quotation marks into the Terminal window. The Bless command changes the startup disk. Replace "Startup_Disk_Name" with the correct name of the disk you want to boot from. If the name contains spaces, enclose the entire path in quotation marks. For example, if your startup disk is labeled "My Mac," type the following command: sudo bless -mount "/Volumes/My Mac" -setBoot.


Press "Enter" to run the command and change the startup disk. Note that your Mac boots from the new disk after you restart it. To restart the Mac from the command line immediately, run the following command: sudo shutdown -r now. Don't forget to save your work before you issue the command.