ArticleslgStudy

science

Who (Unix)

Who (Unix) is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Who (Unix) rather than just read about it. In short: The standard Unix command who displays a list of users who are currently logged into the computer. The who command is related to the command w, which provides the same information but also displays additional data and statistics.

Who (Unix) — main illustration
Who (Unix) — illustration

Key takeaways

  • Who (Unix) belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Who (Unix) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Who (Unix) from memory before moving on to harder problems.

Reference excerpt

The standard Unix command who displays a list of users who are currently logged into the computer. The who command is related to the command w, which provides the same information but also displays additional data and statistics.

History A who command that displays the names of users logged in was first implemented for the CTSS operating system by Noel Morris in 1965. This inspired Tom Van Vleck to write a Multics version. Later, it appeared in Version 1 Unix and became part of the X/Open Portability Guide since issue 2 of 1987. It was inherited by the first version of POSIX.1 and the Single Unix Specification. The existence of who presupposes the existence of an online group of users in a shared collegial environment with a need to communicate with each other. The version of who bundled in GNU coreutils was written by Joseph Arceneaux, David MacKenzie, and Michael Stone.

Specification The Single UNIX Specification (SUS) specifies that who should list information about accessible users. The XSI extension also specifies that the data of the username, terminal, login time, process ID, and time since last activity occurred on the terminal, furthermore, an alternate system database used for user information can be specified as an optional argument to who. The command can be invoked with the arguments am i or am I (so it is invoked as who am i or who am I), showing information about the current terminal only (see the command tty and the -m option below, of which this invocation is equivalent).

Usage The SUS without extensions only specifies the following -m, -T, and -u options, all other options are specified in the XSI extension.

-a, process the system database used for user information with the -b, -d, -l, -p, -r, -t, -T and -u. -b, show time when system was last rebooted -d, show zombie processes and details -H, show column headers -l, show terminals where a user can log in -m, show information about the current terminal only -p, show active processes -q, quick format, show only names and the number of all users logged on, disables all other options; equivalent to users command line utility -r, show runlevel of the init process. -s, (default) show only name, terminal, and time details -t, show when system clock was last changed -T, show details of each terminal in a standard format (see note in Examples section) -u, show idle time; XSI shows users logged in and displays information whether the terminal has been used recently or not Other Unix and Unix-like operating systems may add extra options. GNU who includes a -i option behaving similarly to -u and a -w option displaying whether the user listed accepts messages (the SUS displays this when -T is specified), yet GNU who and BSD who both omit a number of the above options (such as -a, -b, -d, and others); GNU who instead uses -l to perform DNS lookups on hostnames listed.

Output The SUS without extensions specifies that the output format is to be "implementation-defined". The XSI extension specifies a format, but notes that it is not fully specified; delimiters and field lengths are not precisely specified. Thus, the format of the output differs considerably among Unix implementations.

See also List of Unix commands

References

External links

who – Shell and Utilities Reference, The Single UNIX Specification, Version 5 from The Open Group who — manual page from GNU coreutils who(1) – OpenBSD General Commands Manual who(1) – Plan 9 Programmer's Manual, Volume 1

Worked examples

Example 1 — a first encounter with Who (Unix)

Start with the simplest possible case. Write down what Who (Unix) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Who (Unix) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Who (Unix) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Who (Unix)

In research
Who (Unix) appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Who (Unix) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Who (Unix) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Multics commands, Plan 9 commands, Standard Unix programs, so understanding it makes those chapters shorter.
In everyday life
Look for Who (Unix) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Who (Unix)” →

How to study Who (Unix) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Who (Unix) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Who (Unix) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Who (Unix) in simple terms?

The standard Unix command who displays a list of users who are currently logged into the computer. The who command is related to the command w, which provides the same information but also displays additional data and statistics.

Why does Who (Unix) matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Who (Unix)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Who (Unix).

Tags

  • Multics commands
  • Plan 9 commands
  • Standard Unix programs
  • Unix SUS2008 utilities
  • Unix user management and support-related utilities

Keep exploring