who
who linux command cheatsheet by Thamizhiniyan C S
Introduction
This command is used to show who is logged on.
Syntax
who [OPTION]... [ FILE | ARG1 ARG2 ]
Important Flags
Flag | Description |
---|---|
| Print all information provided by -b, -d, --login, -p, -r, -t, -T, -u options. |
| Display the time of the last system boot. |
| Print dead processes. |
| Print a line of column headings. |
| Print IPs instead of hostnames. With --lookup, canonicalizes based on stored IP, if available, rather than stored hostname. |
| Print system login processes. |
| Attempt to canonicalize hostnames via DNS. |
| Display only hostname and user associated with stdin. |
| Print active processes spawned by init. |
| Print all login names and the number of users logged on. |
| Print the current runlevel. |
| Print only name, line, and time (default). |
| Print the last system clock change. |
| Add user's message status as +, - or ?. |
| List users logged in. |
| Same as -T. |
| Same as -T. |
| Display help information and exit. |
| Output version information and exit. |
Examples
Command | Description |
---|---|
Display a list of the logged-in usernames. | |
Achieve the same effect as 'who' with the short format. | |
Print column headers above the list of users. | |
Display information about the current user only. | |
Show a list of available terminals. | |
Display the time of the last system boot. | |
List the usernames and the number of users currently logged on. | |
Show the user's message status. | |
Print a list of active processes spawned by init. | |
Print a list of dead processes. | |
Display the current runlevel of the system. | |
Print the last time the system clock was changed. | |
Show how long each user has been idle. | |
Print all information provided by various options in a single output. |
Last updated