finger

Used to find and display user information

Supplementary instructions

finger command is used to find and display user information. It includes users from local and remote hosts. There is no case difference in account names. Execute the finger command alone, and it will display the login information of all current users on the local host, including account name, real name, login terminal, idle time, login time, address and phone number.

grammar

finger(option)(parameter)

Options

-l: Lists the user's account name, real name, user-specific directory, login shell, login time, forwarding address, email status, as well as plan file and program file contents;
-m: Excludes searching for the user’s real name;
-s: List the user's account name, real name, login terminal, idle time, login time, address and phone number;
-p: Lists the user's account name, real name, user-specific directory, login shell, login time, forwarding address, and email status, but does not display the user's plan files and program file contents.

If an operator is provided without specifying the finger option, the default is set to -l output style, otherwise it is -s style. Note that in both formats, if there is insufficient information, some fields may be lost. If there is no Specifying the parameter finger will print an entry for each user currently logged in.

Parameters

Username: Specify the user to query information.

Example

To use finger on your computer:

[root@localhost root]# finger
login Name Tty Idle Login time Office Office Phone
root root tty1 2 Dec 18 13
root root pts/0 1 Dec 18 13
root root *pts/1 Dec 18 13

If you want to query the user information on the remote machine, you need to follow the user name with @hostname in the format of username@hostname. However, the network host to be queried needs to be supported by running the finger daemon.