who command used to displays the information about logged-in users, when the system has booted last time on Linux operating system.
who [options] [filename]
who Command in Linux with Examples
1.To display the information (login name) about current logged-in users, use who command in terminal.
By default who command displays the following information about any logged-in user
- Login name of the user
- Date and time of recently logged-in users into system
- Remote hostname of the user
2. To display all the information about currently logged-in users, use who -a command in terminal. You can also use who –all command in terminal.
3. To display the whole list of logged-in user, Use who -u command in Terminal.
4. To display logged-in user username use whoami command.
5. To display the list of all logged-in user and their activities, use w command.
6. To display user identification information, use “id” command.
7. To display information about the logged-in users and host associated with it, use “-m” option with who command.
who -m -H
8. To display the information about all active process
who -p -H
9. To display status of the users message as +, – or ? , Use who -T command.
who -T -H
10. To display the number of currently logged-in users with their login name (username), Use who -q command in terminal.
who -q -H
11. To display system login process, use “-l” option with who command.
who -l -H
12. To display the list of all dead processes, Use who -d, who –dead command in terminal. Use who -d -H for human-readable format.
who -d -H
13. To display the time of last system boot. Use who -b, who –boot command in terminal. For human-readable format use who -b -H command.
who -b -H