Using the sudo command in Terminal requires a non-blank administrator password

To execute the sudo command in Terminal on your Mac, log in with an administrator account that has a password.

You can use the sudo command in the Terminal app to execute commands as a different user, such as the root user. However, if you enter a blank password after entering the sudo command, Terminal doesn't execute the command. Instead, it either returns you to the command prompt (this is normal for some commands, whether or not they are executed) or asks you to try again.

Add a password to your account by following the steps to change your password. You can then use the sudo command and enter your administrator password when prompted. (You you won't see the password as you type it. This is normal. If you enter the wrong password, Terminal asks you to try again.)

Published Date: