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:

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.

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

Meet the wildlife conservation AI 5G hotspot at MWC Barcelona 2026

From March 2-5 in Barcelona, Canonical will present a working wildlife conservation platform that combines…

22 hours ago

Canonical and Ubuntu RISC-V: a 2025 retro and looking forward to 2026

2025: From RISC-V enablement to real execution  2025 was the year that RISC-V readiness gave…

2 days ago

Unmasking the Resolute Raccoon

You’ve almost certainly seen them… In the forest, rummaging through a dumpster, in poorly aging…

2 days ago

Bad Voltage Season 1 Episode 43: Got The Om On

Jono Bacon, Stuart Langridge and myself present Bad Voltage, in which Bryan is sadly unavoidably…

4 days ago

2011 LinuxQuestions.org Members Choice Award Winners – Thoughts

The polls are closed and the official results are in. You can view the detailed…

4 days ago

Building quantum-safe telecom infrastructure for 5G and beyond

coRAN Labs and Canonical at MWC Barcelona 2026 At MWC Barcelona 2026, coRAN Labs and…

5 days ago