Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • Shell Scripting
  • Kali Linux
  • Ubuntu
  • Red Hat
  • CentOS
  • Docker in Linux
  • Kubernetes in Linux
  • Linux interview question
  • Python
  • R
  • Java
  • C
  • C++
  • JavaScript
  • DSA
Open In App
Next Article:
fold command in Linux with examples
Next article icon

Finger command in Linux with Examples

Last Updated : 11 Sep, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

The ‘finger’ command is a powerful utility in Linux used to display information about users logged into the system. This command is commonly used by system administrators to retrieve detailed user information, including login name, full name, idle time, login time, and sometimes the user’s email address. The ‘finger’ command offers more comprehensive details compared to the ‘pinky’ command, which is a lighter version with limited output.

Installing finger User Information Lookup Tool

To install ‘finger’ tool use the following commands as per your Linux distribution.

1. For Debian/Ubuntu

$sudo apt-get install finger

2. For CentOS/RedHat

$sudo yum install finger

3. For Fedora OS

$sudo dnf install finger

Working with finger User Information Lookup Tool

Once installed, the ‘finger’ command can be used to fetch detailed information about users on your Linux system. Here are some common ways to use this command:

1. Retrieving User Information

To get detailed information about a specific user, simply use the ‘finger’ command followed by the username.

$finger manav 

Note: Here “manav” is the username.

To-finger-or-get-details-of-a-user

As can be seen, it displays the login name, name, directory, shell, login time, email, and plan of the user.

2. Checking Idle Status and Login Details

The ‘-s’ option provides a summary of the user’s details, including idle status, which is useful for tracking user activity.

$finger -s manav 

To-get-idle-status-and-login-details-of-a-user

As can be seen, it displays the idle status along with the details of the user.

3. Suppressing Plan, PGP Key, and Project Information

If you want to avoid displaying the user’s plan, PGP key, and project details, use the ‘-p’ option.

$finger -p manav 

To-avoid-printing-PGP-key-plan-and-project-details

As can be seen, it displays the login name, name, directory, shell, login time, email, but not the plan, PGP key, and project of the user.

4. Creating a Plan for a User

Users can set personal notes or a “plan” that will be displayed when the finger command is used. To create a plan, you can add text to the ‘.plan‘ file in the user’s home directory.

$echo "Plan details" > ~/.plan 

To-create-a-plan-for-a-user

Now, after again using finger command it will display a plan for the user.

5. Creating a Project for a User

Similar to plans, users can also set a “project” that describes their current projects or tasks. This information is stored in the ‘.project’ file.

$echo "Project details" > ~/.project 

To-create-a-project-for-a-user

Now, after again using finger command it will display a project for the user.

6. Adding a PGP Key for a User

Users can also include their PGP keys using the ‘.pgpkey’ file in their home directory. This is useful for sharing public keys through the ‘finger’ command.

$echo "pgpkey" > ~/.pgpkey 

To-create-a-PGP-key-for-a-user

Now, after again using finger command it will display a PGP key for the user.

Conclusion

The ‘finger’ command is a handy tool in Linux for system administrators and users to see detailed information about user accounts. You can use it to check who is logged in, see when someone last logged in, view personal notes or projects, and manage user details. By learning how to use ‘finger’ and its options, you can easily keep track of user activity and manage your system better, making it easier for everyone to work together.


    Next Article
    fold command in Linux with examples
    author
    manav014
    Improve
    Article Tags :
    • Linux-Unix
    • Technical Scripter
    • Write From Home
    • linux-command

    Similar Reads

    • expect command in Linux with Examples
      expect command or scripting language works with scripts that expect user inputs. It automates the task by providing inputs. // We can install expect command using following if not installed // On Ubuntu $sudo apt install expect // On Redhat based systems $ yum install expect First we write a script
      2 min read
    • export command in Linux with Examples
      The 'export' command is one of the essential built-in commands in the Bash shell, allowing users to manage environment variables effectively. It is defined in POSIX standards, which state that the shell will assign the export attribute to specified variables, causing them to be included in the envir
      3 min read
    • expr command in Linux with examples
      The expr command in Unix is a versatile tool used for evaluating expressions in the shell environment. It performs a wide range of functions, including arithmetic calculations, string operations, and comparisons based on regular expressions. What is the 'expr' Command?expr stands for "expression" an
      3 min read
    • factor command in Linux with examples
      The factor command in Linux is used to print the prime factors of the given numbers, either given from the command line or read from standard input. The numbers given through standard input may be delimited by tabs, spaces or newlines. Syntaxfactor [NUMBER]You can provide one or more numbers as argu
      2 min read
    • fc Command in Linux with Examples
      As we all know that LINUX is command friendly and while working on LINUX, you may deal with very long commands that may include long paths or really difficult syntax, and imagine what if working with such commands you do a minor mistake which will require re-writing of the entire command synopsis an
      3 min read
    • fc-cache command in Linux with Examples
      The fc-cache command in Linux scans the font directories and build font cache for applications which use fontconfig for their font handling. When no arguments are passed fc-cache scans each directory for font files readable by FreeType. A cache is created which contains properties of each font and t
      2 min read
    • fc-list command in Linux with examples
      fc-list command is a part of the fontconfig system. It is used to list the available fonts and font styles. Using the format option, the list of all fonts can be filtered and sorted out. Moreover, multiple parameters can be passed to it after a colon symbol (:) to restrict the information that is be
      3 min read
    • fdisk command in Linux with examples
      The 'fdisk' command in Linux, short for "format disk," is a powerful, dialog-driven utility used for creating and manipulating the disk partition table. Essential for system administrators and users looking to manage their hard drive’s structure, 'fdisk' supports a range of operations such as creati
      5 min read
    • fg command in Linux with examples
      The fg command in Linux is used to bring a background job into the foreground. It allows you to resume a suspended job or a background process directly in the terminal window, so you can interact with it. Syntaxfg [job_spec]The job_spec is a way to refer to the background jobs that are currently run
      3 min read
    • fgrep command in Linux with examples
      The 'fgrep' filter is used to search for the fixed-character strings in a file. There can be multiple files also to be searched. This command is useful when you need to search for strings that contain lots of regular expression metacharacters, such as "^", "$", etc. This makes 'fgrep' particularly v
      4 min read
    geeksforgeeks-footer-logo
    Corporate & Communications Address:
    A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
    Registered Address:
    K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
    GFG App on Play Store GFG App on App Store
    Advertise with us
    • Company
    • About Us
    • Legal
    • Privacy Policy
    • In Media
    • Contact Us
    • Advertise with us
    • GFG Corporate Solution
    • Placement Training Program
    • Languages
    • Python
    • Java
    • C++
    • PHP
    • GoLang
    • SQL
    • R Language
    • Android Tutorial
    • Tutorials Archive
    • DSA
    • Data Structures
    • Algorithms
    • DSA for Beginners
    • Basic DSA Problems
    • DSA Roadmap
    • Top 100 DSA Interview Problems
    • DSA Roadmap by Sandeep Jain
    • All Cheat Sheets
    • Data Science & ML
    • Data Science With Python
    • Data Science For Beginner
    • Machine Learning
    • ML Maths
    • Data Visualisation
    • Pandas
    • NumPy
    • NLP
    • Deep Learning
    • Web Technologies
    • HTML
    • CSS
    • JavaScript
    • TypeScript
    • ReactJS
    • NextJS
    • Bootstrap
    • Web Design
    • Python Tutorial
    • Python Programming Examples
    • Python Projects
    • Python Tkinter
    • Python Web Scraping
    • OpenCV Tutorial
    • Python Interview Question
    • Django
    • Computer Science
    • Operating Systems
    • Computer Network
    • Database Management System
    • Software Engineering
    • Digital Logic Design
    • Engineering Maths
    • Software Development
    • Software Testing
    • DevOps
    • Git
    • Linux
    • AWS
    • Docker
    • Kubernetes
    • Azure
    • GCP
    • DevOps Roadmap
    • System Design
    • High Level Design
    • Low Level Design
    • UML Diagrams
    • Interview Guide
    • Design Patterns
    • OOAD
    • System Design Bootcamp
    • Interview Questions
    • Inteview Preparation
    • Competitive Programming
    • Top DS or Algo for CP
    • Company-Wise Recruitment Process
    • Company-Wise Preparation
    • Aptitude Preparation
    • Puzzles
    • School Subjects
    • Mathematics
    • Physics
    • Chemistry
    • Biology
    • Social Science
    • English Grammar
    • Commerce
    • World GK
    • GeeksforGeeks Videos
    • DSA
    • Python
    • Java
    • C++
    • Web Development
    • Data Science
    • CS Subjects
    @GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
    We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
    Lightbox
    Improvement
    Suggest Changes
    Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
    geeksforgeeks-suggest-icon
    Create Improvement
    Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
    geeksforgeeks-improvement-icon
    Suggest Changes
    min 4 words, max Words Limit:1000

    Thank You!

    Your suggestions are valuable to us.

    What kind of Experience do you want to share?

    Interview Experiences
    Admission Experiences
    Career Journeys
    Work Experiences
    Campus Experiences
    Competitive Exam Experiences