If you’re not interested in all the gory details you get about users when you finger them,you can instead use who to get just the basics. With who you get just the users’ names, connection information, login times, and host names, as shown in Code Listing 7.10.
who
At the shell prompt, type who. You’ll get user information like that shown in Code Listing 7.10. Optionally, you could pipe the output of who to more, as in who | more, which would give you a long list of results one screen at a time.
✓ Tips
If you’re a system administrator or use several different userids, you might occasionally need to use a special case of who,called whoami. Just type whoami at the shell prompt, and it’ll tell you which userid you’re currently logged in as.
See Chapter 1 for more on more and on piping commands.
[ejr@hobbes ejr]$ who
ejr tty1 Jul 22 07:42
root tty2 Jul 22 15:13
asr tty4 Jul 24 13:32
deb tty5 Jul 24 13:32
ejr ttyp1 Jul 24 12:14
→ (calvin.raycomm.com)
ejr ttyp0 Jul 24 13:02
→ (calvin.raycomm.com)
[ejr@hobbes ejr]$
|