21 Linux · Users & Groups questions from the System Administration bank, written for Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd.
Free to start: the 2-minute IT readiness check — six questions and a result.
C.add a user to a supplementary group (e.g. wheel)
D.show a user's UID, GID and group memberships
Answer + AI explanation with Pro
2. Which command will create a user 'alice' with a home directory?
Junior
A.gpasswd -a alice docker
B.userdel -r alice
C.id alice
D.useradd -m alice
Answer + AI explanation with Pro
3. Which statement is correct?
Junior
A.useradd -m alice — add a user to a group via gpasswd
B.useradd -m alice — set or change a user's password
C.useradd -m alice — show a user's UID, GID and group memberships
D.useradd -m alice — create a user 'alice' with a home directory
Answer + AI explanation with Pro
4. What does passwd alice do?
Junior
A.delete a user and remove their home directory
B.set or change a user's password
C.add a user to a group via gpasswd
D.create a user 'alice' with a home directory
Answer + AI explanation with Pro
5. Which command will set or change a user's password?
Junior
A.passwd alice
B.whoami
C.id alice
D.gpasswd -a alice docker
Answer + AI explanation with Pro
6. Which statement is correct?
Junior
A.passwd alice — set or change a user's password
B.passwd alice — delete a user and remove their home directory
C.passwd alice — create a user 'alice' with a home directory
D.passwd alice — add a user to a group via gpasswd
Answer + AI explanation with Pro
7. What does id alice do?
Junior
A.print the current effective username
B.add a user to a supplementary group (e.g. wheel)
C.show a user's UID, GID and group memberships
D.set or change a user's password
Answer + AI explanation with Pro
8. Which command will show a user's UID, GID and group memberships?
Junior
A.userdel -r alice
B.gpasswd -a alice docker
C.usermod -aG wheel alice
D.id alice
Answer + AI explanation with Pro
9. Which statement is correct?
Junior
A.id alice — add a user to a group via gpasswd
B.id alice — create a user 'alice' with a home directory
C.id alice — set or change a user's password
D.id alice — show a user's UID, GID and group memberships
Answer + AI explanation with Pro
10. What does whoami do?
Junior
A.print the current effective username
B.set or change a user's password
C.show a user's UID, GID and group memberships
D.delete a user and remove their home directory
Answer + AI explanation with Pro
11. Which command will print the current effective username?
Junior
A.useradd -m alice
B.gpasswd -a alice docker
C.usermod -aG wheel alice
D.whoami
Answer + AI explanation with Pro
12. Which statement is correct?
Junior
A.whoami — add a user to a supplementary group (e.g. wheel)
B.whoami — print the current effective username
C.whoami — add a user to a group via gpasswd
D.whoami — create a user 'alice' with a home directory
Answer + AI explanation with Pro
13. What does usermod -aG wheel alice do?
Mid
A.create a user 'alice' with a home directory
B.add a user to a supplementary group (e.g. wheel)
C.add a user to a group via gpasswd
D.show a user's UID, GID and group memberships
Answer + AI explanation with Pro
14. Which command will add a user to a supplementary group (e.g. wheel)?
Mid
A.usermod -aG wheel alice
B.whoami
C.userdel -r alice
D.id alice
Answer + AI explanation with Pro
15. Which statement is correct?
Mid
A.usermod -aG wheel alice — print the current effective username
B.usermod -aG wheel alice — add a user to a supplementary group (e.g. wheel)
C.usermod -aG wheel alice — show a user's UID, GID and group memberships
D.usermod -aG wheel alice — set or change a user's password
Answer + AI explanation with Pro
16. What does userdel -r alice do?
Mid
A.add a user to a group via gpasswd
B.set or change a user's password
C.print the current effective username
D.delete a user and remove their home directory
Answer + AI explanation with Pro
17. Which command will delete a user and remove their home directory?
Mid
A.userdel -r alice
B.gpasswd -a alice docker
C.whoami
D.id alice
Answer + AI explanation with Pro
18. Which statement is correct?
Mid
A.userdel -r alice — add a user to a group via gpasswd
B.userdel -r alice — create a user 'alice' with a home directory
C.userdel -r alice — show a user's UID, GID and group memberships
D.userdel -r alice — delete a user and remove their home directory
Answer + AI explanation with Pro
19. What does gpasswd -a alice docker do?
Mid
A.add a user to a supplementary group (e.g. wheel)
B.show a user's UID, GID and group memberships
C.print the current effective username
D.add a user to a group via gpasswd
Answer + AI explanation with Pro
20. Which command will add a user to a group via gpasswd?
Mid
A.whoami
B.passwd alice
C.usermod -aG wheel alice
D.gpasswd -a alice docker
Answer + AI explanation with Pro
21. Which statement is correct?
Mid
A.gpasswd -a alice docker — set or change a user's password
B.gpasswd -a alice docker — create a user 'alice' with a home directory
C.gpasswd -a alice docker — add a user to a group via gpasswd
D.gpasswd -a alice docker — print the current effective username
Answer + AI explanation with Pro
Free to start
Start with a free readiness check
Sign up free for the 2-minute IT readiness check and a scored result. Answers, explanations and the AI tutor on every Linux · Users & Groups question come with Pro.