nerdexam
LPI

010-150 · Question #70

010-150 Question #70: Real Exam Question with Answer & Explanation

The correct answer is D. id. The id command prints a user's UID, primary GID, and all supplementary group memberships. It is the standard way to inspect group associations for a user.

Question

Which command displays the list of groups to which a user belongs?

Options

  • Awhoami
  • Blsgroup
  • Cwho
  • Did

Explanation

The id command prints a user's UID, primary GID, and all supplementary group memberships. It is the standard way to inspect group associations for a user.

Common mistakes.

  • A. 'whoami' only prints the effective username of the current user and provides no group information.
  • B. 'lsgroup' is not a standard command on Linux or Unix systems and does not exist by default.
  • C. 'who' shows which users are currently logged into the system, not group memberships.

Concept tested. Displaying user and group identity with id

Reference. https://www.man7.org/linux/man-pages/man1/id.1.html

Community Discussion

No community discussion yet for this question.

Full 010-150 Practice