Bird
0
0

Which command will display the current logged-in username in Linux?

easy📝 Conceptual Q2 of 15
Linux CLI - Users and Groups
Which command will display the current logged-in username in Linux?
Als -l
Bwhoami
Cpwd
Did -g
Step-by-Step Solution
Solution:
  1. Step 1: Identify command purpose

    whoami prints the current logged-in username.
  2. Step 2: Check other commands

    id -g shows group ID, pwd shows current directory, ls -l lists files. None show username.
  3. Final Answer:

    whoami -> Option B
  4. Quick Check:

    whoami = current username [OK]
Quick Trick: Use whoami to quickly see your username [OK]
Common Mistakes:
  • Using pwd expecting username
  • Confusing group ID with username
  • Trying ls for user info

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes