Difference between revisions of "Su --help"

From wikieduonline
Jump to navigation Jump to search
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
{{lc}}
 
{{lc}}
<pre>
 
  
Usage:
+
Usage:
su [options] [-] [<user> [<argument>...]]
+
  su [options] [-] [<user> [<argument>...]]
 +
 +
Change the effective user ID and group ID to that of <user>.
 +
A mere - implies -l.  If <user> is not given, root is assumed.
 +
 +
Options:
 +
  -m, -p, --preserve-environment      do not reset environment variables
 +
  -w, --whitelist-environment <list>  don't reset specified variables
 +
 +
  -g, --group <group>            specify the primary group
 +
  -G, --supp-group <group>        specify a supplemental group
  
Change the effective user ID and group ID to that of <user>.
+
  -, -l, [[--login]]                 make the shell a [[login shell]]
A mere - implies -l.  If <user> is not given, root is assumed.
+
<pre>
 
 
Options:
 
-m, -p, --preserve-environment      do not reset environment variables
 
-w, --whitelist-environment <list>  don't reset specified variables
 
 
 
-g, --group <group>            specify the primary group
 
-G, --supp-group <group>        specify a supplemental group
 
 
 
-, -l, --login                  make the shell a login shell
 
 
  -c, --command <command>        pass a single command to the shell with -c
 
  -c, --command <command>        pass a single command to the shell with -c
 
  --session-command <command>    pass a single command to the shell with -c
 
  --session-command <command>    pass a single command to the shell with -c

Latest revision as of 16:46, 11 September 2023

Usage:
 su [options] [-] [<user> [<argument>...]]

Change the effective user ID and group ID to that of <user>.
A mere - implies -l.  If <user> is not given, root is assumed.

Options:
 -m, -p, --preserve-environment      do not reset environment variables
 -w, --whitelist-environment <list>  don't reset specified variables

 -g, --group <group>             specify the primary group
 -G, --supp-group <group>        specify a supplemental group 
 -, -l, --login                  make the shell a login shell 
 -c, --command <command>         pass a single command to the shell with -c
 --session-command <command>     pass a single command to the shell with -c
                                   and do not create a new session
 -f, --fast                      pass -f to the shell (for csh or tcsh)
 -s, --shell <shell>             run <shell> if /etc/shells allows it
 -P, --pty                       create a new pseudo-terminal

 -h, --help                      display this help
 -V, --version                   display version

For more details see su(1).


See also[edit]

Advertising: