LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How to know user name when u su to another useraccount (https://www.linuxquestions.org/questions/linux-general-1/how-to-know-user-name-when-u-su-to-another-useraccount-313093/)

amitguptainn 04-14-2005 04:15 AM

How to know user name when u su to another useraccount
 
Hi,
If I have logged on to another useraccount by using 'su' command then how to know from which account I was?


Amit

kencaz 04-14-2005 04:26 AM

Hmmm. If you logged onto their acct, would you not know who it is?

try:
"id"

KC

scuzzman 04-14-2005 04:27 AM

Code:

whoami
provides your username
you can use "exit" to drop back down to the prev. user, then su back up.

Blinker_Fluid 04-14-2005 09:23 AM

Add this to .bashrc
PS1="\u@\h \w --> "

Mara 04-14-2005 04:12 PM

Moved: This thread is more suitable in Linux-General and has been moved accordingly to help your thread/question get the exposure it deserves.


All times are GMT -5. The time now is 12:23 AM.