linuxdot.org Linux Expo Birmingham 2002
Linux news | Newbie's Linux manual | Linux links | Link us
The Linux columns | Book reviews
  DistroWatch + TuxReports November 2, 2002

Contents | Previous | Next | Download

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 | Download

About us  
Latest stable kernel: 2.4.19 | Latest development kernel: 2.5.44
Copyright © 1998-2002 Linuxdot.org.
Linux ® is a registered trademark of Linus Torvalds.