📅  最后修改于: 2022-03-11 14:55:31.832000             🧑  作者: Mango
# MacOS Terminal Error: Using Sudo & Su Sorry!
# You may be trying to perform administrative tasks from the macOS (Mojave or later) terminal, for instance, if you are developing locally (on a Mac, of course).
# You may encounter permissions issues using your local administrative user.
# You may attempt to use the following command:
sudo
# But unfortunately, this is unlikely to work, as the root user is disabled by default in macOS.
# You may also try to get around this by prefixing the popular 'su' command to your command, only to be greeted by an irritating 'Sorry!'
# Don't worry, you can get around this quite easily.
# Here's the solution:
sudo su
# When the password prompt appears, simply enter the login password for your macOS account.
# From now on, you can perform root-user-level tasks without having to use 'su'.
# And you won't have to re-enter that pesky password.