GNU/Linux Command – SU

su — Run a shell with Substitute User Summary:

`su’ allows one user to temporarily become another user. It runs a command with the Real and Effective user id, group id and supplemental groups of a given user. If user not given, by default, it will login as root.

Examples:
$ su -- Run a new shell with root user. $ su user1 -- Run a new shell with user1. $ su -c ls -- Run the command with substitute user. $ su -f user1 -- Fast login (skip startup files). $ su -p user1 -- Preserve the environment variables. $ su -l user1 -- Unset all env variables, change Home dirand run shell startup files. $ su -s /bin/csh -- Run csh shell instead of the user'sdefault shell.
Read: man su

Advertisements
Tagged with: ,
Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: