You can use Terminal commands to unlock encrypted volumes. The commands in this section apply to endpoints running macOS 10.13 and Apple File System (APFS).

Enter a password in the Terminal window on Mac. When a password is required in the Terminal window, you see a key prompt and the cursor changes. When I type in a password in Terminal, it sometimes displays a key icon on top of the cursor. I thought that that meant that there was an integration with the KeyChain, but I don't seem to be able to find anything to corroborate that.

These instructions tell you what the users will see and what they need to do. They must:

  1. Open the Terminal application and run diskutil apfs list
  2. Search for the volume name they want to recover and note the volume identification, for example, Volume disk1s1.
  3. Call the administrator and ask for the recovery key using the volume identification as recovery key ID.
    You give them the recovery key. For help on retrieving a key for one of your users, see the .
  4. Enter the recovery key in the disk password dialog to unlock the disk.
    Alternatively, users can use the command diskutil apfs unlockVolume and enter the recovery key in the Terminal application to unlock the disk.

The disk can now be accessed in Finder.

Terminal User Guide

You must be an administrator or root user, also called superuser, to execute many of the commands used to manage a server.

For example, if you’re not an administrator or a root user, entering the shutdown command gives you an error:

What Is The Password For Terminal In MacWhat is the password for terminal in mac airWhat Is The Password For Terminal In Mac

This is because the shutdown command can be run only by the root user or by an administrator user with root user privileges.

To run commands with superuser privileges, use the sudo command. sudo stands for superuser do.

The following example works on computers with macOS installed, so don’t run it unless you want to restart your computer:

Mac terminal password key icon
% sudo shutdown

Remove Mac Password Terminal

You’re asked for the password of the current user.

What Is The Password For Terminal In Mac Pro

What is the password for terminal in mac air

Only administrator users can use sudo. If you’re not logged in as an administrator, you can do so by entering the following command, where adminUsername is the name of an administrator user:

You’re asked to enter the password for adminUsername, after which a new shell is opened for that user.

If a command requires it, you can use su to switch to the root user. Under normal circumstances, you shouldn’t log in as the root user.

Important: If you use su to log in as the root user, be especially careful, because you have sufficient privileges to make changes that can cause your computer to stop working.

See alsoEnter a password in the Terminal window on Macsudo command man pagesu command man page