usermod

Modify a user account

high risk

interactive breakdown — edit the command and press Explain
$ 
⚠ Risks & cautions
Safer / dry-run alternatives
id <user>Record current groups first
usermod -aG <group> <user>Always use -a with -G
What it does

Edits account attributes: groups, shell, home, login name, lock state.

Common flags
FlagMeaning
-aGAppend to groups (always use -a with -G)⚠ Without -a the user is REMOVED from all other groups.
-LLock account
-UUnlock account
-sLogin shell
-dHome directory (use -m to move)
-lChange login name
Examples
usermod -aG docker aliceAdd alice to a group · explain & risk-check →
usermod -L aliceLock alice · explain & risk-check →
Related
useradd userdel id
Open the full explainer →More in Users, Permissions & Security

Reference text is hand-written and may be incomplete — check man usermod for your version. Test destructive commands on a non-production system first.