Users and Group Management Flashcards
7 cards from real 010-160 practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 Users and Group Management flashcards as text
Which command creates a new group called 'devops' on a Linux system?
Answer: groupadd devops
groupadd devops is the standard command to create a new group entry in /etc/group.
What does the 'last' command display?
Answer: A history of user login and logout events
The last command reads /var/log/wtmp and displays a list of all recent logins, logouts, and system reboots.
A system administrator wants to rename the group 'oldteam' to 'newteam'. Which command achieves this?
Answer: groupmod -n newteam oldteam
groupmod -n sets a new name for an existing group, leaving the GID and members intact.
What is the minimum number of fields in a valid /etc/passwd entry?
Answer: 7
/etc/passwd has exactly 7 colon-separated fields: username, password, UID, GID, GECOS, home directory, and shell.
Which command shows only the usernames of users currently logged into the system?
Answer: users
The users command prints a simple space-separated list of usernames of all currently logged-in users.
When using useradd without the -m flag on some distributions, what may NOT be created automatically?
Answer: The user's home directory
On some Linux distributions, useradd requires the -m flag to create the home directory; without it, no home directory is created.
Which command would allow you to switch to user 'carol' and load her full environment?
Answer: su - carol
su - carol (with the hyphen/dash) starts a login shell for carol, loading her environment variables, PATH, and profile scripts.