Categories: TutorialsUbuntu

Linux finger command to find user details

The finger command is used in Linux and Unix-like systems to check the information of all currently logged on users from the terminal. It is a command line utility that gives users logon time, tty (name), idle time, home directory, shell name, etc.

The Finger package is not installed by default in most Linux and Ubuntu and other Debian-based systems. In this tutorial we are going to review how to install and use the finger command on Linux.

Finger command syntax

The following command shows the syntax of the finger command:

Sponsored
class="wp-block-preformatted">finger [-lmsp] [user1 user2 ….. ]

Install finger

You can use the following command to install the finger command in Linux distributions.

On Ubuntu and Debian systems:

$ sudo apt-get install finger

On Fedora systems:

$ sudo dnf install finger

On Redhat and CentOS systems, you can use the yum command to install or Download package.

$ sudo yum install finger

1) Finger command with option -s

With the -s option, the finger command prints the login name, real name, terminal name, and write status of the user (the asterisk in front of the terminal name means you do not have write permission for this device), idle time, login time, office location, and office phone number.

The login time is displayed in the format MM DD HH: mm. If the time exceeds six months, the year is displayed instead of the hours and minutes.

2) Finger command with option -l

The finger command with the -l option displays all of the information described for the -s option as well as the user’s home directory, home phone number, login shell, email status, and so on.

The expression “(messages off)” means that the user “harry” does not have write authorization for “root” on the devices pts / 4 and pts / 7. If a user is logged in more than once, the terminal information is repeated once per login.

Sponsored

Also returns ‘.plan’, ‘.project’ and ‘.pgpkey’ files if any. In the screenshot above, user ‘harry’ has ‘no plan’.

3) Finger command with option -p

The -p option is the same as the -l option, except that it does not include users’ .plan, .project, and .pgpkey files in the returned result.

4) Finger command with option -m

With the -m option, the finger command prevents username matches in the returned result. All name comparisons carried out with the finger are not case-sensitive.

For example, our system has two users named “harry” and “harry1”. Without the -m option, the finger command returns information from both users and only returns information from user ‘harry’ when followed by -m.

With option -m

Without the -m option

If no options are specified, finger defaults to -l style output if operands are provided, -s style otherwise.

If no arguments are given, finger prints an entry for each user currently logged on to the system.

diploma

In this tutorial, we learned how to print user information using the finger command. I hope you enjoy reading it and please leave your suggestion in the comment section below.

Ubuntu Server Admin

Recent Posts

Canonical Releases Ubuntu 25.04 Plucky Puffin

The latest interim release of Ubuntu introduces “devpacks” for popular frameworks like Spring, along with…

2 days ago

Ubuntu 25.04 (Plucky Puffin) Released

Ubuntu 25.04, codenamed “Plucky Puffin”, is here. This release continues Ubuntu’s proud tradition of integrating…

3 days ago

Extended Security Maintenance for Ubuntu 20.04 (Focal Fossa) begins May 29, 2025

Ubuntu released its 20.04 (Focal Fossa) release 5 years ago, on March 23, 2020. As…

3 days ago

Ubuntu 20.04 LTS End Of Life – activate ESM to keep your fleet of devices secure and operational

Focal Fossa will reach the End of Standard Support in May 2025, also known as…

4 days ago

Ubuntu MATE 25.04 Release Notes

Ubuntu MATE 25.04 is ready to soar! 🪽 Celebrating our 10th anniversary as an official…

4 days ago

Ubuntu Weekly Newsletter Issue 887

Welcome to the Ubuntu Weekly Newsletter, Issue 887 for the week of April 6 –…

6 days ago