Difficulty: Easy
Correct Answer: who
Explanation:
Introduction / Context:
UNIX is a multi-user operating system. Administrators and users frequently need to see who is presently logged in, from which terminals or pseudo-terminals, and sometimes at what times, for collaboration or troubleshooting sessions.
Given Data / Assumptions:
Concept / Approach:
The command “who” lists all logged-in users with their terminals and login times. The variant “who am i” (or “whoami” as a different command) pertains to your current effective user/session only. The command “which” traces the path to executables in your PATH and is unrelated. The text “1 /u” is not a valid command in this context.
Step-by-Step Solution:
Verification / Alternative check:
Compare “who” with “w”: the latter shows CPU usage and the command currently running. “who am i” returns information about your current session line only.
Why Other Options Are Wrong:
which: finds executables, not users. who am i: only your session, not all users. 1 /u: not a valid command. None: incorrect because “who” is correct.
Common Pitfalls:
Confusing “whoami” (single word) with “who am i”; misinterpreting pseudo-terminals (pts/0, pts/1) as remote logins when they may be local terminal emulators.
Final Answer:
who
Discussion & Comments