From d5f245d18f8f95ac30cdd8b75d862f20de005cd2 Mon Sep 17 00:00:00 2001 From: Noah Tutt Date: Tue, 23 Oct 2018 12:43:27 -0400 Subject: [PATCH 1/6] Added quick reference topic for who --- _commands/basics/who.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 _commands/basics/who.md diff --git a/_commands/basics/who.md b/_commands/basics/who.md new file mode 100644 index 000000000..e69de29bb From 373fd21d55d9aff4af92f752a97f740cf16d4419 Mon Sep 17 00:00:00 2001 From: Noah Tutt Date: Tue, 23 Oct 2018 13:13:46 -0400 Subject: [PATCH 2/6] Added documentation for -r, -H, -b, and default who --- _commands/basics/who.md | 55 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/_commands/basics/who.md b/_commands/basics/who.md index e69de29bb..99978697b 100644 --- a/_commands/basics/who.md +++ b/_commands/basics/who.md @@ -0,0 +1,55 @@ +--- +--- + +who +--- + +`who` provides information about logins and currently logged-in users. + +~~~ bash +$ who -H +NAME LINE TIME COMMENT +noahtutt tty7 2018-10-21 11:46 (:0) +$ who -bH +NAME LINE TIME PID COMMENT + system boot 2018-10-21 11:46 +~~~ + + + +### Useful Options / Examples + +#### `who` +With no arguments, who prints the name, shell location, time of login, and any comments for the current user. + +~~~ bash +$ 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. + +~~~ bash +$ 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. + +~~~ bash +$ 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. + +~~~ bash +$ 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 From f6eaf189e68702116337a0269e85294b4514981b Mon Sep 17 00:00:00 2001 From: Noah Tutt Date: Tue, 23 Oct 2018 13:23:04 -0400 Subject: [PATCH 3/6] Fixed formatting errors in the quick example --- _commands/basics/who.md | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/_commands/basics/who.md b/_commands/basics/who.md index 99978697b..83e334449 100644 --- a/_commands/basics/who.md +++ b/_commands/basics/who.md @@ -7,15 +7,15 @@ who `who` provides information about logins and currently logged-in users. ~~~ bash -$ who -H -NAME LINE TIME COMMENT -noahtutt tty7 2018-10-21 11:46 (:0) -$ who -bH -NAME LINE TIME PID COMMENT - system boot 2018-10-21 11:46 +$ 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 / Examples @@ -25,6 +25,7 @@ With no arguments, who prints the name, shell location, time of login, and any c ~~~ bash $ 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. @@ -44,7 +45,7 @@ NAME LINE TIME PID COMMENT system boot 2018-10-21 11:46 ~~~ -### `who -r` +#### `who -r` Prints the current run-level of the operating system. ~~~ bash @@ -52,4 +53,7 @@ $ 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 +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. + + + From 468b0474becb30dc8e4b27680c7e5e2990a31635 Mon Sep 17 00:00:00 2001 From: Noah Tutt Date: Tue, 23 Oct 2018 13:26:39 -0400 Subject: [PATCH 4/6] Beginning documentation for -u --- _commands/basics/who.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/_commands/basics/who.md b/_commands/basics/who.md index 83e334449..8217e0b43 100644 --- a/_commands/basics/who.md +++ b/_commands/basics/who.md @@ -55,5 +55,9 @@ $ who -r 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 on - +~~~ bash + +~~~ From 2acc07dc9cab8b077c0e7882870353e4b7109b1c Mon Sep 17 00:00:00 2001 From: Noah Tutt Date: Tue, 23 Oct 2018 13:36:41 -0400 Subject: [PATCH 5/6] Finished documentation for who -u and added clarification on comment field --- _commands/basics/who.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/_commands/basics/who.md b/_commands/basics/who.md index 8217e0b43..e647075d6 100644 --- a/_commands/basics/who.md +++ b/_commands/basics/who.md @@ -20,7 +20,7 @@ run-level 5 2018-10-21 11:46 ### Useful Options / Examples #### `who` -With no arguments, who prints the name, shell location, time of login, and any comments for the current user. +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. ~~~ bash $ who @@ -56,8 +56,9 @@ $ who -r 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 on +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` ~~~ bash - +$ who -u +noahtutt tty7 2018-10-21 11:46 (:0) ~~~ From a7de44e78629cf339b06d453d4f050a77fb99af3 Mon Sep 17 00:00:00 2001 From: Noah Tutt Date: Tue, 23 Oct 2018 13:39:37 -0400 Subject: [PATCH 6/6] Grammar fixes --- _commands/basics/who.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_commands/basics/who.md b/_commands/basics/who.md index e647075d6..2329acf34 100644 --- a/_commands/basics/who.md +++ b/_commands/basics/who.md @@ -17,7 +17,7 @@ run-level 5 2018-10-21 11:46 -### Useful Options / Examples +### 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.