- Informational Commands -

The following commands all provide information about the system and the users logged on.

date

Typing date at the prompt will display the current system date and time, for example:

hostname:~bugsy>date
Tue Sep 15 00:44:09 EST 2005

who

Typing who at the prompt will list all of the users who are currently logged into the system, for example:
hostname:~bugsy> who

root        ttyp1       Mar 22 11:14
root        console     Mar 22 11:14
root        :0          Mar 22 11:14
root        ttyp2       Mar 22 11:14
bugsy       ttyp3       Mar 23 00:56
rallen11    ttyp5       Mar 22 22:36
fred        ttyp7       Mar 22 15:46
beck        ttype       Mar 22 22:53
rallen11    ttyq1       Mar 22 23:02
beck        ttyq5       Mar 23 00:24
      

This tells us that the users root, rallen11 and beck are logged on to the system more than once, and that fred and bugsy are logged on once. So what else does it tell us? It displays the terminal which each user is logged into, (you will note that beck is logged into ttype, and ttyq5), and also what time each user logged on.

w

Typing w will also all of the users who are currently logged on to the system, however it outputs the information in a different format, for example:

hostname:~bugsy> w

00:56  up 13:46,  28 users,  load average: 0.52, 0.66, 0.74
User     tty     from           login@  idle JCPU PCPU what
root     p1      :0.0           11:14  13:13           -tcsh
root     console                11:14  13:42           /usr/s
root     :0                     11:14                  -
root     p2      :0.0           11:14  12:51    5      -tcsh
bugsy    p3      host.example.c 00:56                  w
rallen11 p5      lws-209-23.cc. 22:36      5           telnet
fred     p7      pc-205-43.fcit 15:46   8:53    8      -bash
beck     pe      lws-209-23.cc. 22:53      1    2      -bash
rallen11 q1      lws-209-23.cc. 23:02           3      -bash
beck     q5      host.example.c 00:24      1           pico u
      

So what else does this tell us? Well it tells us that the user bugsy, logged onto ttyp3 from host.example.com at 00:56, and that the user is running the command w. This output also lists the idle time of the user...ie 8 hours 53 mins for fred, and 5 mins for rallen11 on ttyp5.

finger

The finger command is used to find out more information about a user on the system. The command can be used in a number of ways the 2 most common being to obtain information a user on the system you are logged into, finger username and to obtain information about a user on a remote system using the format: finger username@hostname. Both will display information about the user, for example:

Login name: bugsy                         In real life: Bugsy
Directory: /users/students/bugsy             Shell: /bin/bash
On since Mar 23 00:56:03
   on ttyp3 from host.example.com
On since Sep 23 00:24:31		1 minute 26 seconds Idle Time
   on ttyq5 from host.example.com
No Plan.
      

This tells us that the user bugsy is Bugsy, and the shell they are using is /bin/bash (don't worry about what that means), when and where they logged on, and how idle each terminal is. It also tells us that bugsy has not set up a .plan file.

If the user you are fingering is not logged in, instead of telling you when they logged on, the output will tell you the last time the user was logged on.

If the user you are fingering does not exist, (or you've typed in the username incorrectly, you will see an error message similar to this:

hostname:~bugsy> finger bugsy

Login name: bugsy                         In real life: Bugsy
      


Page Created 6th March 2005.
Last Modified 1st April 2005.