finger

user managementLinux/Unix
The finger command is one of the most frequently used commands in Linux/Unix-like operating systems. finger Display information about system users

Quick Reference

Command Name:

finger

Category:

user management

Platform:

Linux/Unix

Basic Usage:

finger [options] [arguments]

Common Use Cases

    Syntax

    finger [options] [user[@host]]

    Options

    Option Description
    -s Display the user's login name, real name, terminal name, idle time, login time, and host
    -l Produce a multi-line format displaying all the information described for the -s option as well as the user's home directory, home phone number, login shell, mail status, and plan file
    -p Prevent the -l option from displaying the contents of the .plan file
    -m Match username only by exact match, not by substring
    -b Brief mode, suppressing home directory and shell information in a long format
    -f Suppress the header that is normally printed in a non-long format
    -w Show the full name without truncating at the first comma
    -i Show idle time as minutes instead of hours:minutes

    Examples

    How to Use These Examples

    The examples below show common ways to use the finger command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.

    # Basic Examples Basic
    finger
    Display information about all users currently logged in.
    finger username
    Display detailed information about a specific user.
    finger @hostname
    Display information about users logged in on a remote host. # Advanced Examples Advanced finger -s username Display a short format listing for the specified user. finger -l username Display a long format listing with additional details. finger username@hostname Display information about a user on a remote system. finger -m Match usernames only by exact match, not by substring. finger .plan Display the contents of all users' .plan files.

    Try It Yourself

    Practice makes perfect! The best way to learn is by trying these examples on your own system with real files.

    Understanding Syntax

    Pay attention to the syntax coloring: commands, options, and file paths are highlighted differently.

    Notes

    The finger command is a user information lookup program that provides details about users on a system. Key features of the finger command: 1. User Information: finger displays information about system users including login name, full name, terminal, idle time, login time, and remote host. 2. Plan Files: finger can show the contents of a user's .plan and .project files if they exist in the user's home directory, which traditionally contain information the user wants to share. 3. Remote Capability: finger can query information about users on remote systems using the user@host syntax, if the remote system runs a finger server. 4. Security Implications: Due to security and privacy concerns, the finger service (fingerd) is often disabled on modern systems, especially those connected to the internet. 5. Historical Context: finger was very popular in the early days of Unix and the internet but has declined in use due to security concerns and the rise of other means of user information sharing. 6. Format Options: The command offers both short (-s) and long (-l) output formats depending on how much detail is required. 7. Login Status: finger can show whether users are currently logged in, how long they've been idle, and from where they're connected. Note that while finger remains available on many Unix/Linux systems for backward compatibility, its networked functionality is often disabled, and many security-conscious sites do not allow incoming finger requests.

    Related Commands

    These commands are frequently used alongside finger or serve similar purposes:

    Use Cases

    Learn By Doing

    The best way to learn Linux commands is by practicing. Try out these examples in your terminal to build muscle memory and understand how the finger command works in different scenarios.

    $ finger
    View All Commands