User management

Linux Command Line Quick Reference

1 min read

Published Aug 18 2026


19
0
0
0

CLILinuxUbuntu

Ubuntu provides higher-level adduser and deluser commands as well as lower-level tools such as useradd.

Manage user accounts

bash
sudo adduser alicesudo deluser alicesudo deluser --remove-home aliceid alicegroups alicegetent passwd alicesudo passwd alice

adduser interactively creates the account, home directory and initial password. deluser removes the account. --remove-home also removes its home directory, so use it carefully. id displays UID, primary GID and supplementary groups. passwd sets or changes a password.

Manage group membership with:

Groups and account locking

bash
sudo addgroup developerssudo usermod -aG developers alicesudo gpasswd -d alice developersgroups alicesudo usermod -L alicesudo usermod -U alice

usermod -aG appends supplementary groups. Do not omit -a when adding a group with -G, because without append mode the user's existing supplementary group list is replaced. -L locks password login and -U unlocks it.

© 2025 SimpleSteps.guide
AboutFAQPoliciesContact
Linux Command Line Quick Reference | User management | SimpleSteps.guide