Linux - Finger Command To Find User Details

more linux commands

On Linux operating system, you can simply check the information of any user from remote or local command line interface. That is ‘finger’ command. To use this command, your Linux machine need have ‘finger’ utility installed on it. This feature is a very basic with Linux system, so you can easily find install package proper with you Linux system. This article will focus on usage of ‘finger’ command and its options with demonstration command run on Ubuntu Linux.


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

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 single asterisk.

Linux finger command

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.

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

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 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


Share This :

Free Linux Ebook to Download

Leave a Reply

Commenting Policy:
Promotion of your products ? Comment gets deleted.
All comments are subject to moderation.