The who
command in Bash is used to display a list of users currently logged into the system. It provides information such as the username, terminal, login time, and originating IP address or hostname.
The basic syntax of the who
command is as follows:
who [options] [arguments]
-a
: Show all available information, including users logged in and their idle time.-b
: Display the last system boot time.-q
: Show only the usernames and the number of users logged in.-H
: Print the column headers for the output.who
who -a
who -b
who -q
who -H
who -H
for a clearer output when you need to present the information.who
with other commands like grep
to filter results for specific users.