Finger command in Linux with Examples
The 'finger' command is a powerful utility in Linux used to display information about users logged into the system. This command is commonly used by system administrators to retrieve detailed user information, including login name, full name, idle time, login time, and sometimes the user's email address. The 'finger' command offers more comprehensive details compared to the 'pinky' command, which is a lighter version with limited output.
Installing finger User Information Lookup Tool
To install 'finger' tool use the following commands as per your Linux distribution.
1. For Debian/Ubuntu
$sudo apt-get install finger
2. For CentOS/RedHat
$sudo yum install finger
3. For Fedora OS
$sudo dnf install finger
Working with finger User Information Lookup Tool
Once installed, the 'finger' command can be used to fetch detailed information about users on your Linux system. Here are some common ways to use this command:
1. Retrieving User Information
To get detailed information about a specific user, simply use the 'finger' command followed by the username.
$finger manav
Note: Here "manav" is the username.

As can be seen, it displays the login name, name, directory, shell, login time, email, and plan of the user.
2. Checking Idle Status and Login Details
The '-s' option provides a summary of the user's details, including idle status, which is useful for tracking user activity.
$finger -s manav

As can be seen, it displays the idle status along with the details of the user.
3. Suppressing Plan, PGP Key, and Project Information
If you want to avoid displaying the user's plan, PGP key, and project details, use the '-p' option.
$finger -p manav

As can be seen, it displays the login name, name, directory, shell, login time, email, but not the plan, PGP key, and project of the user.
4. Creating a Plan for a User
Users can set personal notes or a "plan" that will be displayed when the finger command is used. To create a plan, you can add text to the '.plan' file in the user's home directory.
$echo "Plan details" > ~/.plan

Now, after again using finger command it will display a plan for the user.
5. Creating a Project for a User
Similar to plans, users can also set a "project" that describes their current projects or tasks. This information is stored in the '.project' file.
$echo "Project details" > ~/.project

Now, after again using finger command it will display a project for the user.
6. Adding a PGP Key for a User
Users can also include their PGP keys using the '.pgpkey' file in their home directory. This is useful for sharing public keys through the 'finger' command.
$echo "pgpkey" > ~/.pgpkey

Now, after again using finger command it will display a PGP key for the user.
Conclusion
The 'finger' command is a handy tool in Linux for system administrators and users to see detailed information about user accounts. You can use it to check who is logged in, see when someone last logged in, view personal notes or projects, and manage user details. By learning how to use 'finger' and its options, you can easily keep track of user activity and manage your system better, making it easier for everyone to work together.