rusers Command in Linux with Examples

This tutorial explains Linux “rusers” command, options and its usage with examples.

rusers – who is logged in to machines on local network

Description :

The rusers command produces output similar to who, but for the list of hosts or all machines on the local network. For each host responding to the rusers query, the hostname with the names of the users currently logged on is printed on each line. The rusers command will wait for one minute to catch late responders.

Usage :

rusers [ -a ] [ -l ] [ -u | -h | -i ] [ Host …]

Options :

-a
Gives a report for a machine even if no users are logged in.
-h
Sorts alphabetically by host name.
-i
Sorts by idle time.
-l
Gives a longer listing similar to the who command.
-u
Sorts by number of users.

advertisement
advertisement

Examples :

1. To produce a list of the users on your network that are logged in remote machines :

# rusers

2. To produce a list of users sorted alphabetically by host name :

Note: Join free Sanfoundry classes at Telegram or Youtube
# rusers  -h

3. To produce a list of users on a host :

# rusers  -h abc

In this example, the rusers command produces a list of users on the host named “abc”.

advertisement

4. To produce a list of users logged in remote machines and sorted according to each machine’s length of idle time, enter:

# rusers  -i

5. To produce a list of users logged in remote machines and sorted by the number of users logged in, enter:

# rusers  -u

Sanfoundry Global Education & Learning Series – 1000 Linux Tutorials.

advertisement
If you wish to look at all Linux commands and their usage examples, go to Linux Commands Tutorial.

If you find any mistake above, kindly email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.