Linux Finger Command to Find User Details

On the Linux operating system, you can simply check the information of any user from remote or local command line interface. That is ‘finger’ command.

This article will focus on usage of ‘finger’ command and its options with demonstration command run on Ubuntu Linux.


finger [-lmsp] [user1 user2 ….. ]

1) Finger command with option -s

With option –s ‘finger’ displays the user's login name, real name, terminal name and write status ( the asterisk before terminal name mean that you don’t have write permission with that device ), idle time, login time, office location and office phone number. The login time is displayed with format MM DD HH:mm. If the time exceeds six months, the year is displayed rather than the hours and minutes.

Unknown devices, as well as nonexistent idle and login times, are displayed as a single asterisk symbol.

Linux finger command

2) Finger command with option -l

The option –l follow the ‘finger’ command with produces a multi-line format displaying all of the information described for the -s option as well as the user's home directory, home phone number, login shell, mail status, and the contents of the files “.plan”, “.project”, “.pgpkey” and “.forward” from the user's home directory.

linux finger command

The phrase “(messages off)'' mean that user ‘harry’ don’t have write permission to ‘root’ on the devices pts/4 and pts/7. One entry per user is displayed with the –l option; if a user is logged on multiple times, terminal information is repeated once per login.

Mail status is shown as ``No Mail.'' if there is no mail at all, ``Mail last read DDD MMM ## HH:MM YYYY (TZ)'' if the person has looked at their mailbox since new mail arriving, or ``New mail received ...'', “Unread since ...'' if they have new mail.

3) Finger command with option -p

The option –p is completely same with option –l, except it doesn’t include“.plan”, “.project” and “.pgpkey” files of users in returned result.

linux finger command

4) Finger command with option -m

With the option –m ‘finger’ will prevent matching of user names in returned result. User is usually a login name; however, matching will also be done on the users' real names, unless the -m option is supplied. All name matching performed by finger is case insensitive. For example, our system has two users named ‘harry’ and ‘harry1’. Without option –m, ‘finger’ will return information of both users and only return information of user ‘harry’ if there –m follow.

With option ‘-m’

linux finger command

Without option ‘-m’

linux finger command options

If no options are specified, finger defaults to the -l style output if operands are provided, otherwise to the -s style. Note that some fields may be missing, in either format, if the information is not available for them.

If no arguments are specified, finger will print an entry for each user currently logged into the system.

linux command finger

Bobbin Zachariah 8:49 pm


Your email address will not be published. Required fields are marked *

All comments are subject to moderation.