LPIC-1 Exam 101 v5 (Linux Administrator) — Question 117

Which of the following commands generates a list of user names from /etc/passwd along with their login shell?

Answer options

Correct answer: E

Explanation

The correct answer is E because the 'cut' command is specifically designed to extract sections from each line of a file. Options A, B, C, and D do not provide the functionality to extract the required fields; they either format output, remove columns, or sort data but do not isolate the user names and login shells from the /etc/passwd file.