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
On since Sun Apr 5 08:06 (EDT) on tty1 26 minutes 54 seconds idle
On since Sun Apr 5 08:52 (EDT) on tty4 1 hour 15 minutes idle
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.
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:
chfn -r NEW_OFFICE_NUMBER -w NEW_OFFICE_PHONE
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.
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.
Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.
We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.
If you like our content, and would like to help, please consider making a contribution:
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.