Linux · Users & Groups interview questions

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.

Take the free IT readiness check

or take a mock interview set up for this area

1. What does useradd -m alice do?

Junior
  1. A.set or change a user's password
  2. B.create a user 'alice' with a home directory
  3. C.add a user to a supplementary group (e.g. wheel)
  4. 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
  1. A.gpasswd -a alice docker
  2. B.userdel -r alice
  3. C.id alice
  4. D.useradd -m alice

Answer + AI explanation with Pro

3. Which statement is correct?

Junior
  1. A.useradd -m alice — add a user to a group via gpasswd
  2. B.useradd -m alice — set or change a user's password
  3. C.useradd -m alice — show a user's UID, GID and group memberships
  4. D.useradd -m alice — create a user 'alice' with a home directory

Answer + AI explanation with Pro

4. What does passwd alice do?

Junior
  1. A.delete a user and remove their home directory
  2. B.set or change a user's password
  3. C.add a user to a group via gpasswd
  4. 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
  1. A.passwd alice
  2. B.whoami
  3. C.id alice
  4. D.gpasswd -a alice docker

Answer + AI explanation with Pro

6. Which statement is correct?

Junior
  1. A.passwd alice — set or change a user's password
  2. B.passwd alice — delete a user and remove their home directory
  3. C.passwd alice — create a user 'alice' with a home directory
  4. D.passwd alice — add a user to a group via gpasswd

Answer + AI explanation with Pro

7. What does id alice do?

Junior
  1. A.print the current effective username
  2. B.add a user to a supplementary group (e.g. wheel)
  3. C.show a user's UID, GID and group memberships
  4. 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
  1. A.userdel -r alice
  2. B.gpasswd -a alice docker
  3. C.usermod -aG wheel alice
  4. D.id alice

Answer + AI explanation with Pro

9. Which statement is correct?

Junior
  1. A.id alice — add a user to a group via gpasswd
  2. B.id alice — create a user 'alice' with a home directory
  3. C.id alice — set or change a user's password
  4. D.id alice — show a user's UID, GID and group memberships

Answer + AI explanation with Pro

10. What does whoami do?

Junior
  1. A.print the current effective username
  2. B.set or change a user's password
  3. C.show a user's UID, GID and group memberships
  4. D.delete a user and remove their home directory

Answer + AI explanation with Pro

11. Which command will print the current effective username?

Junior
  1. A.useradd -m alice
  2. B.gpasswd -a alice docker
  3. C.usermod -aG wheel alice
  4. D.whoami

Answer + AI explanation with Pro

12. Which statement is correct?

Junior
  1. A.whoami — add a user to a supplementary group (e.g. wheel)
  2. B.whoami — print the current effective username
  3. C.whoami — add a user to a group via gpasswd
  4. D.whoami — create a user 'alice' with a home directory

Answer + AI explanation with Pro

13. What does usermod -aG wheel alice do?

Mid
  1. A.create a user 'alice' with a home directory
  2. B.add a user to a supplementary group (e.g. wheel)
  3. C.add a user to a group via gpasswd
  4. 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
  1. A.usermod -aG wheel alice
  2. B.whoami
  3. C.userdel -r alice
  4. D.id alice

Answer + AI explanation with Pro

15. Which statement is correct?

Mid
  1. A.usermod -aG wheel alice — print the current effective username
  2. B.usermod -aG wheel alice — add a user to a supplementary group (e.g. wheel)
  3. C.usermod -aG wheel alice — show a user's UID, GID and group memberships
  4. 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
  1. A.add a user to a group via gpasswd
  2. B.set or change a user's password
  3. C.print the current effective username
  4. 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
  1. A.userdel -r alice
  2. B.gpasswd -a alice docker
  3. C.whoami
  4. D.id alice

Answer + AI explanation with Pro

18. Which statement is correct?

Mid
  1. A.userdel -r alice — add a user to a group via gpasswd
  2. B.userdel -r alice — create a user 'alice' with a home directory
  3. C.userdel -r alice — show a user's UID, GID and group memberships
  4. 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
  1. A.add a user to a supplementary group (e.g. wheel)
  2. B.show a user's UID, GID and group memberships
  3. C.print the current effective username
  4. 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
  1. A.whoami
  2. B.passwd alice
  3. C.usermod -aG wheel alice
  4. D.gpasswd -a alice docker

Answer + AI explanation with Pro

21. Which statement is correct?

Mid
  1. A.gpasswd -a alice docker — set or change a user's password
  2. B.gpasswd -a alice docker — create a user 'alice' with a home directory
  3. C.gpasswd -a alice docker — add a user to a group via gpasswd
  4. 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.

Take the free IT readiness check

or take a mock interview set up for this area

24,000+ questions & coding problemsSoftware & IT16,274 questionsGovernment jobs26 examsAptitudenew questions every timeAI practice interviewwith feedback65 topics to practiseMechanical1,149 questionsGATE ME9 papersEngineering Mathematics381 questions2-minute checkfreeDSA Problems1,422Civil1,005 questionsGATE CE9 papersCS Fundamentals1,209 questionsYour scores6 skillsSystem Design25Electrical / EEE1,047 questionsGATE EE9 papersRun your codeC++ · Java · PythonLow-Level Design144Electronics & Comm.975 questionsGATE EC9 papersAI help on every questionFull-Stack6,282Chemical1,005 questionsGATE CH9 papersAI whiteboardsystem designWork abroadEurope · remote · transfersESE ME1 paperGATE practice papers2019–2026ESE CE1 paperDate alertsbefore the last dateESE EE1 paperBehavioural courseHR round practiceESE ET1 paperResume optimizerProSSC JE ME1 paperApplication trackerSSC JE CE1 paperCompany-wise prepSSC JE EE1 paperRole roadmapsRRB JE1 subjectPriced in ₹UPI · cardsISRO SC1 paperGATE CS9 papersIBPS SO IT1 paperUGC NET CS1 paperSSC CGL26 papersIBPS PO26 papersRRB NTPC26 papersSSC CHSL26 papersIBPS Clerk26 papersSBI Clerk26 papersRRB Group D26 papersSSC CPO26 papersSSC GD26 papers