This tutorial explains Linux “rusers” command, options and its usage with examples.
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.
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 :
# 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.
- Check Information Technology Books
- Practice Programming MCQs
- Apply for Programming Internship
- Check Linux Books