Skip to content
This repository was archived by the owner on Jun 2, 2020. It is now read-only.

Latest commit

 

History

History
64 lines (48 loc) · 1.58 KB

File metadata and controls

64 lines (48 loc) · 1.58 KB


who

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:46

Useful Options

who

With 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)

who -H

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)

who -b

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	

who -r

Prints the current run-level of the operating system.

$ who -r
		run-level 5	2018-10-21 11:46

The 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.

who -u

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)