| SU(1x) | 1x | SU(1x) |
This manual page is part of Cross-Unix Documentation which is an attempt to provide documentation of similarities and (noteworthy) differencies between Unix-like systems. To be used as an addition to the POSIX standard.
su — switch user /
become superuser
su |
[-plm] [-c
command] [-s
shell] [-] [username [shell arguments]] |
The su utility is used to run a command or
get a shell as another user, without having to log out. By default the
environment is unmodified with the exception of
LOGNAME, HOME,
SHELL and USER.
HOME and SHELL are set to
the target user’s default values. LOGNAME and
USER are set to the target user, unless the target
user has a UID of 0 and -l was not specified, in
which case it is unmodified. The invoked shell is the target user’s.
This is the traditional behaviour of su. If not using
-m and the target login has a UID of 0 then the
PATH variable and umask are set to implementation
defined behaviour.
If [username] was not set it defaults to UID 0 (also known as Super-User).
-lTERM ). Absent in BusyBox.-c
command-p,
-mPATH and
IFS-s
shellGNU coreutils 8.30, Busybox 1.30.1, OpenBSD 6.4, NetBSD 8.0, FreeBSD 12.0
A su command appeared in
Version 7 AT&T UNIX.
Haelwenn (lanodan) Monnier <contact+c-u-d@hacktivis.me>
| 2019-03-06 | Linux 6.12.21-gentoo-x86_64 |