su—become superuser or another user

su [-flmp] [-c command]  [-s shell] [--login] [--fast]
   [--preserve-environment] [--command=command] [--shell=shell ]
   [ – ] [--help] [--version] [ username [ arg … ] ]

su allows one to become another user without logging off. The default username is root (superuser). To use su, the appropriate password must be supplied (unless the invoker is already root). If the password is correct, su creates a new shell process that has the real and effective user ID, group IDs, and supplementary group list set to those of the specified username. The new shell will be the shell specified in the shell field of username's password file entry. If no shell is specified, sh (Bourne shell) is used. To return to normal user ID ...

Get Linux Shells by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.