Linux finger command - description and examples

The Linux finger command displays information about the system users. We can view all information about user if we know the user account login name. Below are some examples of the Linux finger command with useful options that you can use to view user information.

Type 'finger' at the command prompt without any option will give an output of users currently log in the system:

    bill@hitam:~$ finger
    Login     Name          Tty   Idle  Login  Time   Office  Office Phone
    bill      billy jadon   tty1        Apr 10 13:38
    root                    tty2        Apr 10 14:38
    bill@hitam:~$
    

The output is the same if we issue Linux finger command with -s option, but this time we are looking at a specific user:

    bill@hitam:~$ finger -s bill
    Login     Name          Tty   Idle  Login  Time   Office  Office Phone
    bill      billy jadon   tty1        Apr 10 13:38
    bill@hitam:~$
    

This is what each column means:

  • The column Login is user's login name.
  • The column Name is user's full name.
  • The column Tty is terminal user's login in.
  • The column Idle shows idle time.
  • The column Login Time shows date and time when user login in.
  • The column Office shows user's office location.
  • The column Office Phone shows user's office phone number.

Now, try Linux finger command with -l option:

    bill@hitam:~$ finger -l bill 
    Login: bill                             Name: billy jadon
    Directory: /home/bill                   Shell: /bin/bash
    On since Mon Apr 10 13:38 (MYT) on tty1
    No mail.
    No Plan.
    bill@hitam:~$
    

When Linux finger command is issued with -l option, it produces a multi-line format displaying the same result as -s with extra user's home directory, home phone number, shell, mail status, and the contents of the files ``.plan'', ``.project'', ``.pgpkey'' and ``.forward'' from the user's home directory.

Remember that the Linux finger command also can be a threat to the Linux system if not properly secured. Attacker can just guess a username and with information gains from finger command, it just a matter of time before your system being compromised. If you can live without the finger command, just disable the daemon.

Back to Linux basic commands main page.


Post new comment

The content of this field is kept private and will not be shown publicly.
This blog uses the CommentLuv Drupal plugin which will try and parse your sites feed and display a link to your last post, please be patient while it tries to find it for you.

Custom Search