Linux finger command

The finger command in Linux is used to display information about users on a system. It provides details such as the user’s login name, real name, terminal, login time, idle time, and more. The finger command can be used to check the status or retrieve information about specific users.

Here’s an overview of how to use the finger command:

The basic syntax of the finger command is as follows:

finger [username]

Here’s how you can use the finger command:

  1. Display information for a specific user:
    To display information for a specific user, you can run the finger command followed by the username. For example:
   finger username

Replace username with the actual username of the user you want to retrieve information for. This will display detailed information about the user, including login time, idle time, home directory, and more.

For example, to retrieve information for the user “john”, you would run:

   finger john
  1. Display information for all logged-in users:
    If you want to check the status of all currently logged-in users, you can run the finger command without specifying a username. For example:

This will display information for all users who are currently logged in to the system.

  1. Customize the output:
    The finger command provides several options to customize the output. For example:
  • -s: Displays a short format of the output.
  • -l: Displays a long format of the output with additional details.
  • -m: Forces display in a multi-line format.
  • -p: Displays the user’s plan file, if available.
  • -h: Displays a help message with available options. You can combine these options as needed. For example, to display a long format output with the user’s plan file, you would run:
   finger -l -p username

Replace username with the desired username.

Please note that the availability and level of information provided by the finger command may vary depending on the specific Linux distribution and configuration. Additionally, some Linux distributions may have the finger command disabled by default due to security reasons.

For more detailed information and additional options related to the finger command, you can refer to the finger command’s manual page by running man finger in the terminal.