Open In App

Pinky command in Linux with Examples

Pinky command is a user information lookup command which gives details of all the users logged in. This tool is generally used by system administrators. It is similar to the finger tool but in many Linux, Systems pinky comes pre-installed while finger doesn’t, so this command is useful in case you don’t have the right to install a program. Unlike finger, in the pinky, you may trim the information of your interest.

Installing pinky User Information Lookup Tool

To install the pinky tool use the following commands as per your Linux distribution.



In case of Debian/Ubuntu

$sudo apt-get install pinky

In case of CentOS/RedHat



$sudo yum install pinky

In case of Fedora OS

$sudo dnf install pinky

Working with pinky User Information Lookup Tool

1. To get the details of logged in users.

$pinky

As can be seen, it displays the login name, name, idle time of the users who are logged in to the system.

2. To get the report of a single user

$pinky manav

Note: Here “manav” is the username.

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

3. To avoid printing column headings

$pinky -f

As can be seen, it only displays the information of users logged in without their headings.

4. To remove the name column

$pinky -w

This will remove the name column from the output.

5. To remove the name and where column

$pinky -i

This will remove the name and where column from the output.

6. To remove the name, idle and where columns

$pinky -q

This will remove the name, idle and where column from the output.

7. To get complete details of a user(long view)

$pinky -l manav

Note: Here “manav” is the username.

This will give all the details of the user.

8. To remove the directory and shell line from long view of a user

$pinky -l -b manav

Note: Here “manav” is the username.

This will remove the directory and shell line from the long detail view of user.

9. To remove the plan and project file line from the long view of a user.

$pinky -l -h -p manav

Note: Here “manav” is the username.

This will remove the plan and project line from the long detail view of user.

Article Tags :