QuestionQ17

VerifiedGNU and Unix Commands

Which command creates a list of user names from /etc/passwd together with their login shell?

Explanation

/etc/passwd is colon-delimited, with the user name in field 1 and the login shell in field 7. cut -d: -f1,7 /etc/passwd selects exactly those two fields.

Community Discussion

No comments yet. Be the first to start the discussion!