who
who
The who
command is a Linux command that displays a list of users who are currently logged in to the system. It is a versatile command that can be used to quickly get a list of users who are logged in and what they are doing.
The who
command is used as follows:
The who
command will display the following information about each user who is logged in:
Username: The username of the user.
Terminal: The terminal that the user is logged into.
PID: The process ID of the user's shell.
Time: The time that the user logged in.
Idle: The amount of time that the user has been idle.
What: The command that the user is currently running.
For example, the following output from the who
command shows that the user johndoe
is logged into the terminal tty1
and has been idle for 2 minutes. The user is currently running the command vim
.
The who
command is a valuable tool for system administrators who need to monitor the activity of users on their system. It can also be used by users to see who else is logged in and what they are doing.
Here are some other options that can be used with the who
command:
-a
: This option will display all users who are logged in, including users who are logged in via remote terminals.-l
: This option will display additional information about each user, such as their real name and home directory.-r
: This option will display a list of users who are currently logged out, but who have not yet logged out completely.
The who
command is a powerful tool that can be used to get information about the users who are logged in to your system. It is a valuable tool for system administrators and users alike.
help
Last updated