Back to commands

Linux Survival Basics

Read-only, sensitive output

Check a User Identity Record

You need UID, primary group, and supplementary groups for a user.

Command

id username

Before you run this

System impact: Read-only. Output may expose users, paths, tokens, keys, IPs, process arguments, or log details.

When not to use it: Do not run the command against the sample username; replace it with the target account first.

Expected output

UID, GID, and group memberships for the target username.

System impact

Read-only, sensitive output. Nothing changes. The command reads current state and prints diagnostic evidence.

Recovery / rollback: no state is changed.

When to use it

Use before editing sudoers or adding group membership.

When not to use it

Do not run the command against the sample username; replace it with the target account first.

Example run

Commands shown

These are the commands shown for inspection. Treat them as an example, not proof that your system will behave identically.

  1. id username
  2. id username

next steps

Related commands

Linux Survival Basics Sensitive output

Show User Groups

Group membership explains many sudo and access failures.

groups username
Linux Survival Basics Sensitive output

List sudo Group Members

Before granting sudo, see who already has it.

getent group sudo
Linux Survival Basics Read-only

Check Owner and Mode in One Line

The file existed. The owner and mode explained why it still failed.

stat -c '%A %U:%G %n' /var/www/example/index.html
Linux Survival Basics Sensitive output

Inspect One Process Open Files

Look at one target process, not the whole host, when pressure is scoped.

sudo lsof -p 1234 | head

next diagnostic step

Where to go from this command

Study mapping

Use this as independent command practice: read the notes, predict the output, then compare it with the example before using a real shell.

  • LPIC-1 style command-line practice
  • LFCS style performance-task practice
  • Linux+ style troubleshooting review

Independent study support only. No affiliation, endorsement, exam dumps, or real exam questions.