![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Difference between : Locked User Account & Disabled User Accounts in Linux ? | avklinux | UNIX for Dummies Questions & Answers | 3 | 02-06-2009 09:01 PM |
| single user mode - user accounts passwords | orestis | UNIX for Dummies Questions & Answers | 3 | 02-02-2009 05:18 PM |
| Running script from other user rather than login user | rawatds | Shell Programming and Scripting | 3 | 01-30-2009 01:18 PM |
| How do i change to super user then revert back to ordinary user ,using shell script? | wrapster | Shell Programming and Scripting | 3 | 06-04-2008 07:11 AM |
| Other than root user .Normal user is unable to create files | mallesh | UNIX for Advanced & Expert Users | 1 | 06-22-2005 12:18 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
su - creates a login shell - it's more like logging in that with just su.
See the difference: Code:
/root # su oracle /root # echo $0 ksh ^d /root # /root # su - oracle /home/oracle > echo $0 -ksh /home/oracle > |
|
||||
|
Usually the reason for "-" is that you want the same environment you'd get by logging in as that user, $PATH especially.
Use "-" when you need to know what happens when "sam" logs in: su - sam is going to run sam's shell startup files etc. |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Tags |
| su |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|