who

Format:

who options 

Options:

-a Display all output
-r Report current run level (for LINUX use the command runlevel)
-s List names and time fields
whoami Display the name of the user running the command. This is not an option to the who command, and can be called by itself.

The who command reports who is logged on to to the system. To show users logged on:

					$ who 
root        console        Apr 22 13:27 
pgd         pts/3          Jun 14 15:29 
peter       pts/4          Jun 14 12:08 
dave        pts/5          Jun 14 16:10
				

Who am I?

					$ whoami 
dave
				

Get Linux and Unix Shell Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.