Set a firmware password on your Mac
When you set a firmware password, users who don't have the password can't start up from any disk other than the designated startup disk.
This feature requires a Mac with an Intel processor. For the equivalent level of security on a Mac with Apple silicon, simply turn on FileVault. If the Mac is managed by MDM (mobile device management), MDM administrators can also remotely lock the Mac.
If you forgot the firmware password
How to turn on a firmware password
Turn on your Mac, then press and hold Command-R to start up from macOS Recovery. (Learn what to do if you can’t start up from macOS Recovery.)
If you're asked to select a user you know the password for, select the user, then click Next and enter that user’s administrator password. It’s the password used to log in to the Mac.
When the utilities window appears, click Utilities in the menu bar, then choose Startup Security Utility (or Firmware Password Utility).
Enter your administrator password when prompted. This is the password you use to log in to your Mac.
Click Turn On Firmware Password, then enter a firmware password. Remember this password!
Quit the utility, then choose Apple menu > Restart.
Your Mac asks for the firmware password only when attempting to start up from a storage device other than the one selected in Startup Disk settings, or when starting up from macOS Recovery. Enter the firmware password when you see the lock and password field at startup:
How to turn off a firmware password
Turn on your Mac, then press and hold Command-R to start up from macOS Recovery. (Learn what to do if you can’t start up from macOS Recovery.)
Enter the firmware password when prompted. Forgot the password?
If you're asked to select a user you know the password for, select the user, then click Next and enter that user’s administrator password. It’s the password used to log in to the Mac.
When the utilities window appears, click Utilities in the menu bar, then choose Startup Security Utility (or Firmware Password Utility).
Click Turn Off Firmware Password, then enter the firmware password.
Quit the utility, then choose Apple menu > Restart.
If you forgot the firmware password
If you can't remember your firmware password:
Schedule an in-person service appointment with an Apple Store or Apple Authorized Service Provider.
Bring your Mac to the appointment, and bring your original receipt or invoice as proof of purchase.