sudo OSX

sudo – Set user and do. Execute a single command as another user (root is the default). It will ask for your password. Access is controlled by a configuration file and can be made quite complex (see the man page). By default, any administrator use sudo to perform any command as any user.

Examples:
sudo rm /private/var/db/.AppleSetupDone
Become root just long enough to delete one file.
sudo -u george ls ~george/Documents
Become george and list the files in his Documents directory.
sudo -s
Start a root shell (similar to su, except that it asks for your password, rather than the root password, and doesn’t requires admin access, not wheel membership).

Comments are closed.