Old School Linux Solutions: finger

Back when I first started using Linux nearly all Linux systems were truly multi-user systems. Because of this the finger command was an important tool to keep handy. What finger does is report information on a user. So if you wanted to know the phone number, office number, if the user had mail, etc you would just issue the command:


Where USERNAME is the real user name of the user.

When issued this command would report all of the information the user had set. In most educational institutions you could find out where your instructors office was or what that instructors office hours where - just about any information that user decided to share.

The finger command is still useful. Even on a single-user system (which seems strange to me that a Linux system would only have one user) finger can offer the user login information, shell information, home directory, etc.

When you finger a user you will see information like this:

[jlwallen ~]$ finger jlwallen
Login: jlwallen Name: jackie leigh wallen
Directory: /home/jlwallen Shell: /bin/bash
Office: 1212
On since Sun Apr 5 08:06 (EDT) on tty1 26 minutes 54 seconds idle
(messages off)
On since Sun Apr 5 08:52 (EDT) on tty4 1 hour 15 minutes idle
(messages off)
No mail.

Now for those multi-user systems where the users will want to set their finger "plan", how is it done? Simple. Let's take a look.

Via Command

There is a simple way to edit your finger information - using the chfn command. The structure of this command looks like this:


Where OPTIONS is a list of the possible options to use. The options available are:

-f: Full Name (if you need spaces put the full name in quotes)

-r: Office number

-w: Office phone number

-h: Home phone number

That's pretty much all of the information you can edit with chfn. So if I want to edit my finger plan to reflect a change in office and office phone number I would issue the command:


Where NEW_OFFICE_NUMBER and NEW_OFFICE_PHONE were the actual numbers for the change. Now when anyone fingers my username they will see that new information.

The ~/.plan, ~/.project, and ~/.pgpkey files

These files allows you to add much more to your finger information. When a user fingers you the information will be displayed in the order .pgpkey, .project, and finally .plan. Here's what they can do.

~/.plan - This file is pretty much a catch-all where you can add whatever information you want to add. This is a good place for office hours, class or work schedule, etc.

~/.project - This file contains the projects you are currently working on.

~/.pgpkey - This is your pgpkey.

Naturally you might not want to include all of the above in your finger information. That is the beauty of these files, you can include what you want and leave out what you don't want. I will warn you that including your pgpkey is both a securty issue and takes up a lot of space in the terminal window.

Final Thoughts

You may think finger and plan are too out of date to have any uses. But what about using a Linux server that is administered by multiple people? This is a situation where finger can be used to know who has been logged on, what they have been or are currently working on, etc.

Like all of Linux, there is a beauty in finding interesting solutions for problems. With the finger command you might find a solution to a problem that has eluded you for a while. Give it a try, you might find this tool useful.

Please share this article


Responses to Old School Linux Solutions: finger

  1. Debian April 6, 2009 at 4:24 am #

    Precisely finger is a nice command to get a lot of information about users, due to which sysadmin uninstall it.

Leave a Reply