finger Command

Display detailed information about users on the system, including login status, idle time, and contact information.

Syntax

finger [options] [username] finger [options] [username@hostname] finger -l [username] finger -s [username]

The finger command displays detailed information about users on the system, including login name, real name, terminal, idle time, login time, office location, and home phone number.

Basic Usage

List all logged-in users

# Show all users currently logged in finger # Show all users with detailed information finger -l # Show all users with short format finger -s

Display information about all users currently logged into the system

Get information about specific user

# Get detailed info about a specific user finger username finger john # Get short format info finger -s username # Get long format info finger -l username

Retrieve detailed information about a specific user account

Remote user lookup

# Look up user on remote system finger username@hostname finger [email protected] # Look up user on remote system with domain finger [email protected]

Query user information on remote systems

Common Options

Output format options

# Long format (default) finger -l username # Short format finger -s username # No plan file finger -p username # No .plan file finger -w username

Control the amount and format of information displayed

Information filtering

# Show idle time finger -i username # Show idle time in minutes finger -m username # Show idle time in hours finger -h username

Filter and format specific types of information

Practical Examples

System administration tasks

# Check who is currently logged in finger # Find specific user's login status finger admin # Check idle time for all users finger -i # Get contact info for user finger -l john

Common administrative tasks using finger

User monitoring

# Monitor user activity watch -n 30 finger # Check if user is idle finger -i username | grep -q "Idle" && echo "User is idle" # Find users logged in for more than 24 hours finger | awk '$6 ~ /days/ {print $1}'

Monitor user activity and system usage

Remote system queries

# Check users on remote server finger @192.168.1.100 # Get specific user info from remote finger [email protected] # Check multiple remote systems for host in 192.168.1.{100,101,102}; do echo "=== $host ===" finger @$host done

Query user information across multiple systems

Best Practices

finger Best Practices
  • Use for quick user status checks
  • Combine with other commands for monitoring
  • Use short format for scripts and automation
  • Check remote systems for user management
  • Monitor idle users for security
  • Use in combination with who and w commands
Common Pitfalls
  • Security concerns - May expose sensitive user information
  • Network access - Remote queries may be blocked by firewalls
  • Performance - Can be slow on systems with many users
  • Privacy - Users may not want their information displayed
  • Availability - Not available on all Linux distributions

See also