$ sudo
Execute a command with superuser privileges.
$ sudo
Execute a command with superuser privileges.$ sudo !!
Repeat the last command with superuser privileges.$ sudo -u username command
Run a command as another user.$ sudo dscl . -create /Users/new_user
Create a new user.$ sudo dscl . -delete /Users/username
Delete a user account.$ sudo dseditgroup -o edit -a username -t user admin
Add a user to the admin group.$ sudo dseditgroup -o edit -d username -t user admin
Remove a user from the admin group.$ sudo
Execute a command with superuser privileges.$ sudo !!
Repeat the last command with superuser privileges.$ sudo -u username command
Run a command as another user.$ sudo
Execute a command with superuser privileges.$ sudo
Execute a command with superuser privileges.$ sudo !!
Repeat the last command with superuser privileges.$ sudo -u username command
Run a command as another user.