su
Syntax
su [options] [
username
]
Options
-c
command
passes the command
to the shell.
-f
prevents reading the startup file (.cshrc
) when the shell is csh
or tcsh
.
-l
makes the new shell a login shell by reading the user's startup file.
-p
preserves the environment variables HOME
, USER
, LOGNAME
, and SHELL.
-s
shell
runs the specified shell
instead of the user's default shell.
Description
The su
command lets you assume the identity of another user. You have to provide the password of that user before you can continue. If you do not provide a user name, su
assumes you want to change to the root
user.