The Linux command “who” is used to list the users logged on to the Linux Operating system.
As Linux is a multi-user platform where multiple users can log in simultaneously, the “who” command comes in very handy to identify the number of users logged in at the particular time.
Let’s begin the demonstration for the “who” command:
Open the Linux terminal and enter “who”
$ who
The result should look like this:
$ who
devlab :0 2022-05-04 00:02 (:0)
To list out the various arguments supported for command “who” , you can check the help using command “man who”
We can try out the “who” command using various arguments as,
Check the time when our system was boot (powered ON) last time.
$ who -b
system boot 2022-05-04 00:00
List all Login names and number of users logged on to your machine right now,
$ who -q
devlab
# users=1
That’s all in this tutorial! In case you have any questions/suggestions, do leave a comment.
Have a nice day ahead!