$man 1 id

Ten things the page says. Every one of them is on your machine right now — run the command above and check.

  1. 01

    Print user and group information for each specified USER, or (when USER omitted) for the current process.[man]

  2. 02
    -a

    ignore, for compatibility with other versions.[man]

  3. 03
    -Z, --context

    print only the security context of the process.[man]

  4. 04
    -r, --real

    print the real ID instead of the effective ID, with -ugG.[man]

  5. 05
    -z, --zero

    delimit entries with NUL characters, not whitespace.[man]

  6. 06

    Without any OPTION, print some useful set of identified information.[man]

  7. 07

    id prints information about the given user, or the process running it if no user is specified.[info]

  8. 08

    USER can be either a user ID or a name, with name look-up taking precedence unless the ID is specified with a leading '+'. .[info]

  9. 09

    By default, it prints the real user ID, real group ID, effective user ID if different from the real user ID, effective group ID if different from the real group ID, and supplemental group IDs.[info]

  10. 10

    Each of these numeric values is preceded by an identifying string and followed by the corresponding user or group name in parentheses.[info]

$run --yourself

Ask the system who it thinks you are

Every permission decision on the machine is made against these numbers, not against your username. Seeing the number and the name side by side is the whole lesson.

~
$ id
$ id -u
$ id -un
$ id -G

WHAT YOU SHOULD SEEA full line of uid, gid and groups; then your numeric user id; then the same thing as a name; then every group id you belong to.

$quiz -n 5

Five questions, each one taking a term out of a line above. Ten points for each.

QUESTION 1 OF 5

Which term completes this line from the page? “Print user and group _____ for each specified USER, or (when USER omitted) for the current process.”

From point 1 above.

QUESTION 2 OF 5

Which term completes this line from the page? “print only the _____ context of the process.”

From point 3 above.

QUESTION 3 OF 5

Which term completes this line from the page? “delimit entries with NUL _____, not whitespace.”

From point 5 above.

QUESTION 4 OF 5

Which term completes this line from the page? “id prints information about the given user, or the _____ running it if no user is specified.”

From point 7 above.

QUESTION 5 OF 5

Which term completes this line from the page? “By default, it prints the real user ID, real group ID, effective user ID if different from the real user ID, effective group ID if different from the real group ID, and _____ group IDs.”

From point 9 above.

Answer all five to bank your points.

$play --chapters 5

Three voices, five chapters.

download the full edition

$su - operator

The Operator has a dispatch on id(1), and he files them for subscribers only. It is free. Join the club, or read about the series.

MOTD is a weekday reading of one manual page already installed on your own machine. Every statement is quoted from that page or from the GNU info documentation beside it, and every edition names the command that shows you the source.

archive · the operator · about · podcast · Feline Union

MOTD 0 pts 0d streak quiz open