[Previous] [Contents] [Next]

su

Switch user ID (UNIX)

Syntax:

su [-c] [userid [arguments]]

Options:

-c
Pass the specified list of arguments to the Shell.
userid
Switch to the specified user ID.

Description:

The su utility lets a user temporarily become another user, then return to their regular userid.

The su utility requests the password of the given userid (root, by default) and changes to that userid, invoking its shell but modifying only essential elements of the environment. Only the HOME, PATH, and possibly SHELL environment variables are changed, but the new shell has the rights and privileges of the user specified. The new userid remains in effect until this shell exits.

Files:

/etc/passwd
This file defines the valid user IDs on the system.

See also:

login, passwd


[Previous] [Contents] [Next]