CloudsArk
Commands Linux

useradd Interview Questions and Answers

Review common useradd interview questions with practical answers and command examples.

useradd Interview Questions and Answers

Introduction

These questions test whether you understand what useradd does, when to use it, and how to verify the result on Linux.

Beginner Questions

What does useradd do?

It creates local Linux user accounts.

Show a basic command.

sudo useradd student

Intermediate Questions

Name useful options.

  • -m: create a home directory.
  • -s: set login shell.
  • -G: set supplementary groups.

Show a common administrator command.

sudo useradd -m -s /bin/bash student

Scenario-Based Questions

How would you handle useradd -m?

sudo useradd -m student

What would you verify afterward?

id student

Expected output should look similar to:

uid=1001(student) gid=1001(student) groups=1001(student)

Practical Task Questions

Practice in a lab by running a safe version of the command, explaining the target, and showing the verification output.

Quick Review

sudo useradd student
sudo useradd -m -s /bin/bash student
id student

Summary

A strong useradd answer includes the purpose, a correct example, a common mistake, and a verification command with output you can interpret.