Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Difference between who am i & whoami 1

Status
Not open for further replies.

ddrillich

Technical User
Jun 11, 2003
546
US
Good Day,

What's the difference between 'who am i' and 'whoami'?

Regards,
Dan
 
The whoami utility displays your effective user ID as a name. See man whoami

The command "who" has arguments "am i". See man who

 
I think of it as a conversation...

You: whoami?
System: root
You: No, who am i *really*??
System: Oh, you mean who did you *log in* as?? Annihilannic of course! Having a bad memory day??

Annihilannic.
 
Ok, but why do I see the following after logging in as autonomy?

[autonomy@sbkj2ksrchtxtf03 ~/dan]$ whoami
autonomy
[autonomy@sbkj2ksrchtxtf03 ~/dan]$ who am i
[autonomy@sbkj2ksrchtxtf03 ~/dan]$
[autonomy@sbkj2ksrchtxtf03 ~/dan]$ who
autonomy pts/0 Aug 7 11:24 (172.26.118.41)
autonomy pts/1 Aug 20 10:42 (10.2.156.147)
autonomy pts/2 Aug 21 09:31 (10.2.156.165)

who am i shows nothing.

Regards,
Dan
 
go:
tty
go:
last autonomy

If you don't have an entry, perhaps you don't have a pseudo tty?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top