Why can't I run `su`? (and how should I do?)

Solution 1:

In MacOS X, the root user is disabled by default, therefore su will not work. As others have stated, it's best to use sudo.

If you must enable the root user, see Apple's technote: Enabling and using the "root" user in Mac OS X.

Solution 2:

You have two options. The first is to use sudo -s - this will give you superuser access, but you will still remain 'yourself' (so to speak), so things like ~ will still be your home directory. Alternatively, you can use sudo su, which gives you a shell as the actual root user of your Mac.