Linux Comm Finger
[ Linux Command Manual](#)
The `finger` command is used to view detailed information about users on a local or remote system, including login name, full name, login time, idle time, and more.
It provides a richer display of user information compared to the `who` and `id` commands, making it suitable for understanding the status of other users on a multi-user server.
`finger` is a user information query tool commonly used in early Unix systems, with its name derived from the concept of "pointing to" someone.
It can read personal description information for users from the GECOS field in `/etc/passwd` and display their login status.
Although modern Linux distributions no longer install `finger` by default for security reasons, it still has value in intranet environments and educational scenarios.
> `finger` requires the system to be running the `fingerd` service to query remote user information. For security reasons, most public servers have disabled this service.
### Command Syntax
The basic syntax for `finger` is as follows:
finger [user@host]
If no parameters are specified, it lists a summary of all currently logged-in users.
If a username is specified, it displays detailed information for that user.
Specifying the `user@host` format allows querying user information on a remote host.
The commonly used options for `finger` are summarized below:
| Option | Function | Example |
| --- | --- | --- |
| `-s` | Display user information in short format | `finger -s` |
| `-l` | Display user information in detailed long format | `finger -l tutorial` |
| `-p` | Do not display the contents of .plan and .project files | `finger -p tutorial` |
| `-m` | Disable matching search for usernames | `finger -m tutorial` |
* * *
## Detailed Usage
### Viewing Currently Logged-In Users
Running `finger` without parameters will list summary information for all logged-in users on the system.
# View all currently logged-in users $ finger Login Name Tty Idle Login Time Office Office Phone root root tty1 May 19 09:00 tutorial Zhang San pts/0 3 May 19 10:30 A-301 010-12345678
The output includes information such as login name, full name, terminal, idle time, login time, office, and phone number.
### Viewing Detailed Information for a Specified User
Specifying a username allows you to view the complete information for that user.
# View detailed information for the tutorial user $ finger tutorial Login: tutorial Name: Zhang SanDirectory: /home/tutorial Shell: /bin/bash Office: A-301, 010-12345678 Home Phone: 010-87654321Last login Tue May 19 10:30 (CST) on pts/0Mail last read Tue May 19 09:00 2026 (CST)No Plan.
The detailed information includes the user's home directory, default shell, last login time, mail reading time, etc.
> "No Plan." indicates that there is no `.plan` file in the user's home directory. Once this file is created, its contents will be displayed here, which can be used to show a personal profile or current status.
### Short Format Output
Using the `-s` option allows you to output only key fields, which is suitable for quick viewing.
# View user information in short format $ finger -s tutorial Login Name Tty Idle Login Time Office Office Phone tutorial Zhang San pts/0 3 May 19 10:30 A-301 010-12345678
The short format omits detailed content such as the home directory, shell, and last login time, outputting a single line of table data.
### Disabling Fuzzy Matching
By default, `finger` attempts to match all usernames, full names, and other information containing the specified string. The `-m` option disables this behavior, performing an exact match on the username only.
# Exact match on username, do not search full name and other fields $ finger -m tutorial
When there are full names or aliases similar to the target username in the system, `-m` can prevent unexpected results from being returned.
### Viewing Multiple Users
You can specify multiple usernames simultaneously to view information for multiple users at once.
# View multiple users simultaneously $ finger tutorial root Login: tutorial Name: Zhang SanDirectory: /home/tutorial Shell: /bin/bash Office: A-301, 010-12345678 Home Phone: 010-87654321Last login Tue May 19 10:30 (CST) on pts/0No Plan.Login: root Name: root Directory: /root Shell: /bin/bash Last login Tue May 19 09:00 (CST) on tty1 No Plan.
### Viewing Remote User Information
`finger` supports querying users on remote hosts in the format `username@host_address`.
# View user information on a remote host (requires the remote host to have the fingerd service enabled) $ finger tutorial@192.168.1.100Login: tutorial Name: Zhang SanDirectory: /home/tutorial Shell: /bin/bash Last login Tue May 19 08:00 (CST) on pts/1No Plan.
> Remote queries require the target host to be running `fingerd` (the finger daemon) and to have port 79 open to the outside. Most cloud servers have disabled this feature for security reasons.
### Configuring .plan and .project Files
Users can create `.plan` and `.project` files in their home directory to display personalized information.
# Create a .project file (single-line project description) $ echo "TUTORIAL Platform Development" > ~/.project # Create a .plan file (multi-line plan or profile) $ cat > ~/.plan << 'EOF'Current Tasks:1. Responsible for TUTORIAL backend API development2. Maintain database migration scripts3. Code Review Complete by this Wednesday EOF # View user information again $ finger tutorial Login: tutorial Name: Zhang SanDirectory: /home/tutorial Shell: /bin/bash Office: A-301, 010-12345678 Home Phone: 010-87654321Last login Tue May 19 10:30 (CST) on pts/0Project: TUTORIAL Platform DevelopmentPlan:Current Tasks:1. Responsible for TUTORIAL backend API development2. Maintain database migration scripts3. Code Review Complete by this Wednesday
The content of the `.project` file is displayed as a single line, while the content of the `.plan` file can have multiple lines, making it suitable for writing a personal profile or current work tasks.
The extra indentation in the `.plan` file is for alignment purposes. If you want to remove the indentation, you can add an empty line before the content.
* * *
## Differences from the who and w Commands
| Command | Information Richness | Main Purpose | Typical Scenario |
| --- | --- | --- | --- |
| `who` | Basic | Only lists logged-in users, terminals, and login times | Quickly check who is online |
| `w` | Medium | Shows logged-in users and currently running programs | Understand what users are currently doing |
| `finger` | Detailed | Shows complete user information (including contact details, plans, etc.) | View a user's detailed profile |
* * *
## Common Questions
> Modern Linux distributions (such as Ubuntu, Debian, CentOS) do not install `finger` by default. You need to manually run `apt install finger` or `yum install finger` to install it.
> The installation and use of `finger` may pose security risks: it exposes users' personal information and login status. Please confirm that security policies allow its use before using it on enterprise servers.
The office, phone, and other information displayed by `finger` comes from the GECOS field and can be modified using the `chfn` command.
If `finger` does not display any user information, check whether the user entry exists in `/etc/passwd` and whether you have sufficient permissions.
* * *
## Related Commands
| Command | Function |
| --- | --- |
| `who` | Displays currently logged-in users |
| `w` | Displays logged-in users and their current activities |
| `id` | Displays the user's UID, GID, and group memberships |
| `chfn` | Modifies user finger information (full name, phone, etc.) |
| `users` | Displays currently logged-in users in a concise list |
| `last` | Displays recent login records for users |
[ Linux Command Manual](#)
YouTip