who provides information about logins and currently logged-in users.
$ who
noahtutt tty7 2018-10-21 11:46 (:0)
$ who -b
system boot 2018-10-21 11:46
$ who -r
run-level 5 2018-10-21 11:46With no arguments, who prints the name, shell location, time of login, and any comments for the current user. For users logged into a GUI shell, the commend field often contains the DISPLAY variable they are assigned to.
$ who
noahtutt tty7 2018-10-21 11:46 (:0)Adds header information to the output of who. Can make the output easier to read or parse.
$ who -H
NAME LINE TIME COMMENT
noahtutt tty7 2018-10-21 11:46 (:0)Prints time of the last system boot. Note that, while the system boot process is recorded, it doesn't have an owner name or a process ID.
$ who -bH
NAME LINE TIME PID COMMENT
system boot 2018-10-21 11:46 Prints the current run-level of the operating system.
$ who -r
run-level 5 2018-10-21 11:46The run-level of a Linux OS corresponds to a certain set of services that are expected to be running. Runlevel 5 corresponds to an operating system that is runninng in full multiuser mode with networking and a GUI (usually X windows) enabled.
Prints a list of all currently logged in users. Useful for collecting usage data for a machine with many users. When only one user is logged in, produces equivalent output to plain who
$ who -u
noahtutt tty7 2018-10-21 11:46 (:0)