This post is over 3 years old and may no longer be up to date or accurate. You are welcome to point out issues by leaving a comment below. Thank you!

A firmware password prevents starting up from any internal or external storage device other than the startup disk you’ve selected. It’s a great way of protecting your computer from unauthorized tampering and access.

The official documentation requires you to boot from the recovery partition to manage the firmware password. However, Mac OS comes with a command line tool that makes it quicker and easier if you are familiar with the terminal.

This tool needs administrative privileges. You must prefix your commands with sudo and will be prompted for your user account password.

To configure a firmware password on your machine for the first time, run:

sudo firmwarepasswd -setpasswd

Further commands and details are available in the man page (a very quick read):

man firmwarepasswd