User management
Linux Command Line Quick Reference
1 min read
This section is 1 min read, full guide is 20 min read
Published Aug 18 2026
19
Show sections list
0
Log in to enable the "Like" button
0
Guide comments
0
Log in to enable the "Save" button
Respond to this guide
Guide Sections
Guide Comments
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 aliceadduser 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 aliceusermod -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.