Open In App

Pinky command in Linux with Examples

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Share
Report issue
Report

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

To-get-details-of-logged-in-users

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.

To-get-the-report-of-a-single-user

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

To-avoid-printing-column-headings

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

4. To remove the name column

$pinky -w

To-remove-the-name-column

This will remove the name column from the output.

5. To remove the name and where column

$pinky -i

To-remove-the-name-and-where-column1

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

6. To remove the name, idle and where columns

$pinky -q

To-remove-the-name-idle-and-where-columns

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.

To-get-complete-details-of-a-userlong-view

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.

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

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.

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

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


Last Updated : 10 May, 2020
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads