In the Linux operating system, a command-line utility known as “finger” is used to display all available information about the system’s user.
This guide will see how to get the system’s user information through several finger command options.
Syntax:
Follow the below syntax:
finger [ option ] [ username ]
Installing finger on Linux:
Linux distribution almost does not provide the finger command by default. It is not present on Ubuntu.
First, install a finger command on Ubuntu 20.04 Linux operating system. Follow mentioned command:
The finger command will be installed in our system.
Use finger command:
If you don’t define an argument with the finger command, it will give all the currently logged-in user information.
Finger will display all those who are currently logged into the system if no arguments are mentioned.
Options:
Getting started with different options.
Display specific user information:
If you want to get information of any specific user, pass the user’s name as an argument with the finger command:
It shows the following information:
User: who is the user
Name: User name
Directory: User’s home directory
Shell: Talks about the shell user is using
On since: Logged in time and date.
Mails: It will show the mails if you have.
Plan: It shows the user’s created plan.
Display a long list of one user:
Use -l option to display a long list of user information.
Display user information column-wise:
Use –s option to display the output column-wise.
Restrict some information:
Sometimes the user does not want to show the plan’s content, the project,” and. PGP key. Use –p option to omit some information.
Prevent matching of username:
By default, the input user name is balanced with both user username names and real names. On the other hand, you can use the -m option to disable the above matching.
Conclusion:
Figure command is used to get information of currently logged users into the system. This article focused on using the finger command and the different options through which we get user information.