commands

useradd — create a local account

Administrative operation. -m requests home creation, -g selects an existing primary group, -s selects a login shell. Defaults depend on local settings; a successful account creation does not grant administrator access. The example is help only. Example assumes a fresh account lab fixture; VM-only examples require explicit authorization.

Formal Syntax & Structure

linux syntaxlinux
useradd [OPTION] LOGIN

Parameters & Attributes

NameTypeDescription
-moptioncreate home
-goptionprimary group
-soptionlogin shell
LOGINoperandnew account name

Return Value

exit status and output

Administrative operation. -m requests home creation, -g selects an existing primary group, -s selects a login shell. Defaults depend on local settings; a successful account creation does not grant administrator access. The example is help only.

Working Example

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