How to use the command "finger" (with examples)
- Windows
- November 5, 2023
finger user@host
Motivation for using the example
The motivation for using this example is to obtain detailed information about a specific user on a remote system. By using the finger
command followed by the username and the hostname, we can retrieve information such as the user’s login name, full name, home directory, and the time of the last login.
Explanation for every argument
user
: Represents the username of the user whose information you want to display.host
: Specifies the hostname or IP address of the remote system where the user exists.
Example output
Login: user Name: John Doe
Directory: /home/user Shell: /bin/bash
On since user was last logged in on Tue Jan 12 14:32:45 2022 from 192.168.0.100
No mail.
Plan:
Welcome to my profile.
2: Display information about all users on the specified host
finger @host
Motivation for using the example
The motivation for using this example is to retrieve a list of all users on a specific remote system. By using the finger
command followed by the @
symbol and the hostname, we can obtain information about every user who has an account on that system. This can be useful for system administrators to manage and monitor user accounts.
Explanation for every argument
host
: Specifies the hostname or IP address of the remote system where the users exist.
Example output
Login: user1 Name: John Doe
Directory: /home/user1 Shell: /bin/bash
On since user1 was last logged in on Tue Jan 12 14:32:45 2022 from 192.168.0.100
No mail.
Plan:
Welcome to my profile.
Login: user2 Name: Jane Smith
Directory: /home/user2 Shell: /bin/bash
On since user2 was last logged in on Tue Jan 12 16:45:12 2022 from 192.168.1.50
No mail.
Plan:
Hello! Feel free to reach out.
3: Display information in a longer format
finger user@host -l
Motivation for using the example
The motivation for using this example is to obtain more detailed information about a specific user on a remote system. By using the -l
option with the finger
command, we can display a longer format of information, including additional details such as the user’s office location, office phone number, and the time of the last login.
Explanation for every argument
user
: Represents the username of the user whose information you want to display.host
: Specifies the hostname or IP address of the remote system where the user exists.-l
: Specifies the option to display information in a longer format.
Example output
Login: user Name: John Doe
Directory: /home/user Shell: /bin/bash
Office: Room 123
Office Phone: 555-1234
On since user was last logged in on Tue Jan 12 14:32:45 2022 from 192.168.0.100
No mail.
Plan:
Welcome to my profile.
4: Display help information
finger /?
Motivation for using the example
The motivation for using this example is to display the help information for the finger
command. By running finger /?
, we can get a quick overview of the command syntax, available options, and their usage. This can be helpful for users who are new to the finger
command and need assistance with its usage.
Explanation for every argument
/?
: Represents the option to display the help information for thefinger
command.
Example output
Displays information about one or more users on a specified system.
FINGER [user@]host [-l] [-s] [user@]host [...] [...]
[user@]host Specifies the name or IP address of the user or users
you want to list.
-l Displays the long format.
-s Suppresses the user information user banner.
/? Displays this help message.
Conclusion
In this article, we have explored different use cases of the finger
command. We have learned how to display information about a specific user, retrieve a list of all users on a remote system, view information in a longer format, and access the help information. By using these examples, users can efficiently utilize the finger
command for user management and system monitoring purposes.