User information :

who - reports who is logged on by login id along with the terminal logged in from and time user logged in. Used with the -q option, who provide a list of just user ids and a final count of user logins. This can be useful for generating a list of users for a script to process. Many systems support who am i which will run the who on just you and your current login session.

finger - reports who is logged in by login id. Originally created for the Berkeley Unix systems, finger reports more information than who. finger can also be applied to a single user id and it will then report if the user is logged in and when he/she logged in. If not logged in, when the user was the last login. It will also report whether the user has unread or new mail.

It can also display the user's .plan file if it exists. The .plan file is a text file that the user can post in her/his home directory which can contain any announcements the user wishes to make known to finger.

It is possible to finger anyone on any Unix system if you know the system's id and the system allows it. It is now common to block the finger command from another system to prevent individuals trying to crack the system's security from finding out valid user ids.

whoami - returns your user id and just the id. This can be useful in a shell script when the script needs the id of the individual invoking the script.

w - reports login status and resource usage for those logged in.

id - id [ specific_login_id ] - reports your own or specified user's UID, group associations and their GIDs.

Exercise :

#( Try the following just to see the variations. )

who

who am i

whoami

finger

#( Now pick an id of one of users listed and finger that id.)

finger z#

#( Finger the following z-id. User is seldom logged in.)

finger z912730

id z912730