Linux CLI - Users and GroupsWhich command correctly extracts the username and UID from /etc/passwd?Acut -d':' -f1,3 /etc/passwdBgrep -d':' -f1,3 /etc/passwdCawk -F',' '{print $1,$3}' /etc/passwdDsed -n '1,3p' /etc/passwdCheck Answer
Step-by-Step SolutionSolution:Step 1: Understand the /etc/passwd delimiterThe fields in /etc/passwd are separated by colons (:), so the delimiter for cut must be ':'Step 2: Extract username and UID fieldsThe username is field 1 and UID is field 3, so cut -d':' -f1,3 extracts these correctly.Final Answer:cut -d':' -f1,3 /etc/passwd -> Option AQuick Check:Correct delimiter and fields = cut -d':' -f1,3 /etc/passwd [OK]Quick Trick: Use colon as delimiter with cut for /etc/passwd fields [OK]Common Mistakes:Using wrong delimiter in cutConfusing grep with field extractionUsing wrong field separator in awk
Master "Users and Groups" in Linux CLI9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More Linux CLI Quizzes File Permissions and Ownership - chown (change ownership) - Quiz 4medium File and Directory Operations - rm (remove files) - Quiz 15hard File and Directory Operations - touch (create empty files) - Quiz 7medium File and Directory Operations - Why file management is daily work - Quiz 9hard Linux Basics and Terminal - Shell concept (Bash, Zsh) - Quiz 4medium Navigating the File System - pwd (print working directory) - Quiz 6medium Navigating the File System - Tab completion - Quiz 6medium Viewing and Editing Files - head and tail - Quiz 8hard Viewing and Editing Files - head and tail - Quiz 1easy Viewing and Editing Files - tail -f for live log monitoring - Quiz 7medium