-
a command that can operate like root
-
only the user who has administrator privileges can use
sudo-
how to check if the user has administrator privileges
-
list all members in
admingroupopen the terminal:
dscl . read /groups/admin | grep GroupMembership
expected output:
GroupMembership: root adm
it shows only
rootandadmhave administrator privileges in this computer -
check out
idopen the terminal:
dscl . read /groups/admin | grep PrimaryGroupID
expected output:
PrimaryGroupID: 80
check out if this user is in
admin(No. 80) group:id
-
-
-
read the user manual of
sudoopen the terminal:
man sudo
-
default off
-
can do a lot of things to damage your computer
-
recommend not to use it (use
sudoinstead) -
how to sign in as
root-
read the official documentation first
- 如何在 Mac 上啟用 root 使用者或更改 root 密碼
-
- 如何在 Mac 上啟用 root 使用者或更改 root 密碼