Sometimes, while taking care of the demand line, you may want to know more about logged in users. There exists a command line utility who which you can use to access this type or types of information. Within guide, we shall discuss the basics of who using some easy to understand examples.

But before we do that, it’s worth mentioning that all examples here have been tested on Ubuntu 16.04 LTS.

As already mentioned, the who command shows who all are logged in. Here’s its syntax:

who [OPTION]… [ FILE | ARG1 ARG2 ]

And following is what the tool’s man page says you a good idea on how this utility works.( about it:

Print information about users who are currently logged in.

Following are some Q&A-styled examples that will give*********)

Q1. Exactly how whom command works?

Basic use is pretty simple – simply perform the ‘who‘ demand.


For instance, on my system, the output that is following produced:

How who command works

And on a server machine, following output was produced:

Who command result

So the outputs basically shows user ‘himanshu’ and ‘ubuntu’ logged in on tty7 and pts/0 (respectively) on February 16 at 09:07 and 09:35 (respectively). The column that is last ip associated information.

Q2. How exactly to access time of final system boot?

For this, make use of the -b demand line choice.

who -b

How to access time of last system boot

This information are accessed utilizing the command that is-d option.

who -d

Q4. How to print system login processes?

For this, use the command that is-l choice.

who -l

How to print system login processes

Q5. How exactly to print active procedures spawned by init?

To display all of the init-spawned, active procedures, make use of the command that is-p option.

who -p

Q6. How to print number of users logged in?

In case you want to print names of all users logged in as well as the count that is total make use of the -q demand line choice.

who -q

How to print number of users logged in

Q7. How exactly to print system that is last change?

To print the system that is last alter, make use of the -t demand line choice.

who -t

To printing the run that is current value, use the -r command line option.

who -r

How to print run level related information


As you’d agree, the who command is pretty easy to understand and use. It does provide a complete lot of demand line choices, however the learning bend is not high anyway. We have talked about many choices right here. If you are done exercising these, you’ll find out more about the device by maneuvering to its guy web page.

Just how to Install Pearl Extension in ISPManager Hosting Control Interface

Previous article

In Case You Update Your Cordless Router?

Next article

You may also like


Leave a Reply

More in Linux