- Home
- Linux
- Misc
- Windows basic tutorials
- Introduction to windows
- Windows pre-installation
- Windows Installation
- Windows xp desktop
- Log on for the first time
- Windows XP control panel
- Managing Folders in Windows XP
- Outlook Express Setup
- How to import address book in Outlook Express
- Import Ms Exchange inbox file(.pst) into Ms Outlook 2003
- Import Outlook Express email messages into Ms Outlook 2003
- How to mount and unmount usb drive (thumb drive) in Windows
- House keeping - Keep your Windows clean and tidy
- Windows basic tutorials
- CMS
- Blog
- Disclaimer
- Privacy Policy
- Support
- Contact
Change user or substitute user in command line terminal using Linux su command
Submitted by jinlusuh on Sun, 11/22/2009 - 20:33
The Linux su command is often use when performing administrative task in Linux system. Linux system administrator or Linux user do not use root as a personal account. When a certain task needs root privilege, then the Linux su command, which is used to substitute user, become useful. The Linux su command allows user to switch to other UID and GID from the command line terminal. Here is a description and synopsis from su manual page:
NAME |
When invoking su command with no option, user are switching to root by default. Here is the example:
[email protected]:~$ su |
You need to provide the correct password for the user account you are switching to. You'll get the root environment when you successfully enter the correct password as in the su command example below:
[email protected]:~$ su |
If we want to substitute user or switch to other user id, use Linux su command with username switch. Here is the example on how to use su command to substitute user in Linux command line terminal:
[email protected]:/home/kkcjlab# su jimi |
You don't have to provide user password if you are root. If you are using your personal account (normal user account), you have to provide the correct password for the user account that you are switching to. Here is the su command example if you are switching to another user from a normal user account:
[email protected]:~$ su jimi |
You can use 'exit' command or simply press 'Ctrl+D' combination keys to switch back to your account when you finished doing your job. Here is the example on how to end session and return to your user account:
[email protected]:/home/kkcjlab$ exit |
That's all.

Add new comment