Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions

  




 

 

Chapter 10. Managing users

su

username (Switch User), change to a different user.

Use su - to switch to root or su username, to switch to a different username.

Tip Using sudo
 

Its often considered better practice to use the sudo command rather than switch to the root user

The sudo command allows you to perform actions as root but logs the actions you take (so you can trace anything that was done to the system by yourself or others). sudo has a very good manual page which provides plenty of information about it.

You use sudo similar to how you execute a normal command with sudo prepended to it, for example:

 sudo rpm -U myrpm.i386.rpm 


This would allow you to install a rpm even if you have the correct sudo access

Note that if you want to return to your original user you don't use su again, type exit or press CTRL-D .

Simply typing su will give you some root privileges, but there are minor complications relating to environment variables. It's generally considered better practice to use su - because it has no restrictions.

root The superuser. This user has power over everything and all, and can do anything with the system (including destroy it, and of course fix it :)). This user is used to perform most administration functions on the system.

 
 
  Published under the terms of the GNU General Public License Design by Interspire