Do you want to know who has logged into your Linux computer? Well, don’t collect
finger; raise your
pinky instead of this.
For some details about the people who have logged on to a Linux or Unix-like computer, many system administrators will likely turn to the
finger command. Which is fine and good, but on many systems
finger will be missing. It is not installed by default. You may be walking through a system on which this command is not available.
Instead of installing
finger– provided you have permission to do so – you can use
pinky, a light and modern design from
finger. It installed by default on all of the Linux distributions that were tested during the research for this article, including Ubuntu, Manjaro, and Fedora.
A gentle touch
As you’d expect from a Linux command,
pinky has its fair share of command line options (only two of which have names). But surprisingly, they all relate to removing information from the reports that
pinky produced. You can reduce the output so that it only contains the information that is of interest to you.
pinky starts out as lightweight, but can be downright light as a feather by the time you’ve cut off the information you’re not interested in.
With the little finger
The easiest way to use
pinky is to type his name in the command line and press Enter.
The standard output is the Short Format report.
The short report contains the following columns:
- Sign up: The username of the logged in person.
- Surname: The full name of the person, if known.
- TTY: The type of terminal you are logged on to. This will usually be a pts (a pseudo teletype). : 0 means the physical keyboard and display associated with this computer.
- Idle: Waiting period. This shows ????? if the person is running an X-windows display manager that does not provide this information.
- When: Time and date of registration of the person.
- Where: The location from which the person is logged in. Often this is the IP address of a remote computer. An entry of “: 0” means the physical keyboard and display that are connected to the Linux computer.
pinky is sometimes unable to fill a column. It can’t put anything in a column if it doesn’t contain this information. To the example, the system administrator has not recorded the full name of the person who owns the user account named “dave”. Apparently,
pinky cannot display a full name in the Name column and uses “dave” instead.
Reporting on a single user
pinky Reports on every person logged in. To report on a single person, pass their username to
pinky on the command line.
pinky only reports the person with the user name “mary”.
Omit column headings
To remove the column headings from the short format report, use the
The column headings are removed from the report.
Omission of the name column
-w Option causes
pinky to omit the “Name” column.
pinky -w alec
The resulting report does not contain a Name column.
Omission of the name and where columns
-i Option cause
pinky to omit the columns “Name” and “Where”.
pinky -i robert
The report of
pinky no longer contains the columns “Name” and “Where”.
Omission of the columns Name, Idle and Where
To really take things back, you can use the
-q Option to omit the “Name”, “Idle” and “Where” columns.
pinky -q john
pinky obediently removes the “Name”, “Idle” and “Where” columns from the report. We are now at three columns. If we take anything else out, it will hardly be a report.
The report in long format
-l (long format report) Option causes
pinky to increase the information about the people in the report. You must provide the name of a user account on the command line.
(This is one of the two command line options that can be given a name. The other is the
-s (Short format report) option. Since the standard output is the short format report, the
-s Option actually doesn’t do anything.)
pinky -l mary
The long report contains some additional information.
The information in the long format report is:
- User name: The username of the logged in person.
- In real life: The full name of the person, if known.
- Directory: That person’s home directory.
- Sleeve: The shell that person is using.
- Project: The contents of that person’s ~ / .project file, if any.
- To plan: The contents of that person’s ~ / .plan file, if any.
The idea behind the ~ / .project file was that it should be used to contain a brief description of the project or work item that a computer user was engaged in. Likewise, the contents of your ~ / .plan file would be a brief description of the actual work item for this project. It enabled managers and interested parties to see what work a person was doing and what project that work belonged to. This scheme is rarely used today. These fields are likely to be blank for the vast majority of users.
Let’s look at Alec:
pinky -l alec
Alec does not have a ~ / .plan file or a ~. / Project file.
Omission of the directory and the shell line
To omit the row reports for the home directory and the shell from the long format report, use the
pinky -l -b robert
The home directory and shell row reports are removed from the report.
Omission of the project file
To omit the project line from the long format report, use the
pinky -l -h mary
The content of the ~ / .project file is not reported.
Omission of the plan file
To omit the plan line from the long format report, use the
pinky -l -p mary
The content of the ~ / .plan file is not reported.
Why leave out all options?
Why might a command that generates reports have so many information removal options? It allows you to focus on the information you really want. So you have the opportunity to separate the wheat from the chaff. And you can decide what is what.
|Files||tar · pv · cat · tac · chmod · grep · difference · sed · With · man · pushed · popd · fsck · Test disk · seq · fd · pandoc · CD · $ PATH · awk · join · jq · wrinkles · unique · Journalctl · tail · stat · ls · fstab · echo · fewer · chgrp · chown · rev · look · Strings · Type · rename · Postal code · unzip · assemble · ummount · To install · fdisk · mkfs · rm · rmdir · rsync · df · gpg · weather · Nano · mkdir · from · ln · Patch · Convert · rclon · Scraps · srm|
|Processes||alias · screen · above · kind · renice · progress · strace · system · tmux · chsh · story · at · Batch · for free · which · dmesg · chfn · User mod · ps · chroot · xargs · tty · pinkie finger · lsof · vmstat · Time out · Wall · Yes sir · kill · sleep · sudo · it is · Time · groupadd · User mod · groups · lshw · switch off · start anew · Stop · switch off · passwd · lscpu · crontab · date · bg · fg|
|Networking||netstat · Ring · Trace route · ip · ss · who is · fail2ban · bmon · she · finger · nmap · ftp · curl · wget · who · who am I · w · iptables · ssh-keygen · ufw|
Best Linux Laptops for Developers and Enthusiasts