Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-14-2004, 06:28 AM   #1
Registered: Jan 2004
Location: Manchester
Distribution: slackware...
Posts: 344

Rep: Reputation: 31
who is?

a quick one...

i log on as normal user "spoon" and 'su' to do something that requires root privilages... minimalise the terminal window ... to browes the web, do a few other stuff...

i come back to the terminial...

my questions is ... how would i find out as is the terminal still running as root or user "spoon" if i cant remember what user i was working in the terminal window... (is there some kinda command which i can type which would say which user is active in the current terminal window?)

thanks in advance...
Old 08-14-2004, 06:44 AM   #2
Registered: Feb 2004
Location: Valby, Denmark / Citizen of the Web
Distribution: Slackware 14.1
Posts: 879

Rep: Reputation: 39
Well, usually you can tell by the $ or #.
[mjj@localhost mjj]$ su                   <- user
[root@localhost mjj]#                      <- superuser
Old 08-14-2004, 07:02 AM   #3
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 474Reputation: 474Reputation: 474Reputation: 474Reputation: 474
Open a console and type whoami. It's the same command as for Windows.
Old 08-14-2004, 07:03 AM   #4
Registered: Jan 2004
Location: Manchester
Distribution: slackware...
Posts: 344

Original Poster
Rep: Reputation: 31
thanks... tried both... its brilliant...

Last edited by marsques; 08-14-2004 at 10:03 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:02 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration