LINUX
COMMANDS
Contents | Previous
| Next
The su command
$ su - substitute user
The su command allows you to temporarily become
another user, until you press Ctrl+D to
logout.
su
Become root.
su -
Become root and inherit path.
Note:
The root account is set-up with more directories
in its path than an ordinary user. Particularly sbin
directories as well as the usual bin directories,
where the system administration commands are located. Unless
you inherit root's path, many commands you enter
will require the absolute path to the command.
su -p
Become root and stay in (preserve) current directory.
su -c 'rpm -Uvh xchat-1.8.5-0.i386.rpm'
Run this one command as root.
su john
Become john.
Contents | Previous
| Next