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] LOGINParameters & Attributes
| Name | Type | Description |
|---|---|---|
| -m | option | create home |
| -g | option | primary group |
| -s | option | login shell |
| LOGIN | operand | new 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"