commands

usermod — modify a local account

Administrative operation. -a with -G appends supplementary groups; -G alone replaces that list. Existing processes retain their credentials. Review account identity and authorization; do not casually grant admin membership. Example is help only. Example assumes a fresh account lab fixture; VM-only examples require explicit authorization.

Formal Syntax & Structure

linux syntaxlinux
usermod [OPTION] LOGIN

Parameters & Attributes

NameTypeDescription
-aoptionUse with -G to add listed supplementary groups without dropping existing groups.
-GoptionTakes a comma-separated supplementary group list; replaces membership unless used with -a.
LOGINoperandexisting account name

Return Value

exit status and output

Administrative operation. -a with -G appends supplementary groups; -G alone replaces that list. Existing processes retain their credentials. Review account identity and authorization; do not casually grant admin membership.

Working Example

Example Snippetlinux
usermod --help >/dev/null && printf "help available\n"
Linux Reference