The “who” command in Linux/Unix is used to list the users who are currently logged into the system. Here are some examples of using the “who” command:
- List all users:
who
- List users who are logged in to a specific terminal:
who tty1
- List users with their hostname:
who -H
- List all information about users:
who -a
- List users sorted by time they logged in:
who -u
These are some basic examples of using the “who” command. For more options and information, you can refer to the manual page by running the following command:
man who