The `finger` command in Linux is a handy tool that provides information about users on a system, including their login name, real name, terminal, login time, and more. It allows you to retrieve detailed user information, making it useful for system administrators, users, and anyone curious about system activity.
In this article, we’ll explore into the various uses and options of the `finger` command.
To use the `finger` command, you first need to ensure it is installed on your Linux system. Most distributions include it by default, but if it’s not available, you can install it using your package manager.
For example, on Debian-based systems like Ubuntu, you can install it using `apt`:
apt install finger
Basic Usage
- Display Information for All Users
- Display Information for a Specific User
- Display Short Format
- Display Plan File
- Display Long Format
1. Display Information for All Users:
To display information about all users logged in on the system, simply type `finger` without any arguments:
finger
This will provide a list of logged-in users along with their details such as username, terminal, login time, and more.
2. Display Information for a Specific User:
To retrieve information for a specific user, you can use the `finger` command followed by the desired username:
finger <username>
Replace `<username>` with the actual username you want to look up. This will display detailed information for that particular user.
3. Display Short Format:
By default, the `finger` command displays detailed information about the user. However, you can use the `-s` option to display a shorter, more condensed format:
finger -s <username>
Replace `<username>` with the desired username. This option is useful if you only need a brief overview of the user’s details.
4. Display Plan File:
Users can set a “plan” or a message that provides information about their activities or status. The `-p` option allows you to display a user’s plan file:
finger -p <username>
Replace `<username>` with the actual username. If the user has a plan file set, it will be displayed.
5. Display Long Format:
Conversely, if you need more detailed information about a user, you can use the `-l` option to display a longer format:
finger -l
Replace `<username>` with the desired username. This option provides a comprehensive view of the user’s details.
The `finger` command in Linux is a useful tool for retrieving information about users on a system. Whether you need a quick overview or detailed data about a specific user, the `finger` command provides the necessary flexibility to cater to your needs.
Explore its various options and utilize them according to your requirements to effectively manage and monitor users on your Linux system.
You may also like:- How to View SSH Logs on Linux
- How to Change User in Linux Command Line
- [Solution] Missing logstash-plain.log File in Logstash
- Understanding Netstat – The Network Monitoring Tool
- Top 40 Useful Linux Command Snippets
- Using Elasticsearch Ingest Pipeline to Copy Data from One Field to Another
- Top 10 Useful Windows Commands
- Essential Commands For Process Management in Kali Linux
- How To Install Python 2.7.18 From The Source
- How To Parse SSH Authentication Logs with Logstash