This tutorial explains Linux “rusers” command, options and its usage with examples.
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.
rusers [ -a ] [ -l ] [ -u | -h | -i ] [ Host …]
Gives a report for a machine even if no users are logged in.
Sorts alphabetically by host name.
Sorts by idle time.
Gives a longer listing similar to the who command.
Sorts by number of users.
1. To produce a list of the users on your network that are logged in remote machines :
2. To produce a list of users sorted alphabetically by host name :
# 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”.
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.