Skip to main content
Kill -9 Club
Sign in

su

AccountsPackage: util-linux

Opens a shell as another identity, asking for that account's password — not yours. On a server where root has no password, su fails and sudo -i is the intended route.

What its options do in the lessons

From the same glossary the lessons render under their commands, so the two cannot disagree.

su -c
Hands one command to the target's shell instead of opening an interactive session: su - postgres -c psql runs psql, then returns.
su --login
The long form of the dash in su -: a full login session — environment cleared except TERM, PATH rebuilt, profiles read, starting in the target's home directory.

Lessons that teach it

su — command reference | Kill -9 Club