Bird
0
0

What will be the output of this command?

medium📝 Command Output Q4 of 15
Linux CLI - Users and Groups
What will be the output of this command?
grep '^daemon:' /etc/passwd | cut -d':' -f1,3
Adaemon:2
BNo output
Cdaemon:0
Ddaemon:1
Step-by-Step Solution
Solution:
  1. Step 1: Locate the daemon user line in /etc/passwd

    The daemon user typically has UID 2 in /etc/passwd.
  2. Step 2: Extract username and UID fields

    The command cuts fields 1 and 3 separated by ':', so output is 'daemon:2'.
  3. Final Answer:

    daemon:2 -> Option A
  4. Quick Check:

    daemon UID = 2, output = daemon:2 [OK]
Quick Trick: UID for daemon user is usually 2 in /etc/passwd [OK]
Common Mistakes:
  • Assuming UID 1 or 0 for daemon
  • Expecting no output if daemon missing
  • Mixing up field numbers

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes