
Linux Command Line
The ‘who’ command is a commonly used Linux command that displays information about the users currently logged into the system. This command is particularly useful for system administrators and other users who need to monitor and manage users on a Linux-based system. In this article, we will discuss the basics of the ‘who’ command, including when to use it and how to use it with some practical examples.
What is the ‘who’ Command?
The ‘who’ command is a simple command that displays information about the users currently logged into the system. This information includes the username, the terminal they are logged in on, and the time they logged in. The command is typically used to check who is currently logged into the system and what they are doing.
When to Use the ‘who’ Command
The ‘who’ command is typically used when a system administrator or other user needs to monitor and manage users on a Linux-based system. This command can be used to check who is currently logged into the system, what terminal they are logged in on, and the time they logged in. Additionally, the ‘who’ command can be used to check if a specific user is currently logged into the system.
How to Use the ‘who’ Command
The ‘who’ command is a simple command that can be used by typing ‘who’ at the command prompt. By default, the ‘who’ command will display information about all users currently logged into the system.
Here are some examples of how to use the ‘who’ command:
- To display information about all users currently logged into the system, simply type ‘who’ at the command prompt and press enter.
- To display information about a specific user, type ‘who username’ at the command prompt, replacing ‘username’ with the username of the user you want to check.
- To display information about all users logged into a specific terminal, type ‘who -T’ at the command prompt, replacing ‘T’ with the terminal you want to check.
The ‘who’ command is a simple yet powerful tool for managing users on a Linux-based system. Whether you’re a system administrator or a regular user, this command can be used to check who is currently logged into the system, what terminal they are logged in on, and the time they logged in. With the examples provided in this article, you should now have a better understanding of how to use the ‘who’ command and when to use it.
See our list of 75 Linux commands you should know about.