Options (6)
-u, --uidbooleanCreate a new user with the specified user ID
Example:
sudo useradd {{[-u|--uid]}} {{id}} {{username}}-s, --shellbooleanCreate a new user with the specified shell
Example:
sudo useradd {{[-s|--shell]}} {{path/to/shell}} {{username}}-G, --groupsbooleanCreate a new user belonging to additional groups (mind the lack of whitespace)
Example:
sudo useradd {{[-G|--groups]}} {{group1,group2,...}} {{username}}-m, --create-homebooleanCreate a new user with the default home directory
Example:
sudo useradd {{[-m|--create-home]}} {{username}}-k, --skelbooleanCreate a new user with the home directory filled by template directory files
Example:
sudo useradd {{[-k|--skel]}} {{path/to/template_directory}} {{[-m|--create-home]}} {{username}}-r, --systembooleanCreate a new system user without the home directory
Example:
sudo useradd {{[-r|--system]}} {{username}}Examples (7)
Create a new user belonging to additional groups (mind the lack of whitespace)
Create a new user with the home directory filled by template directory files
made by @shridhargupta | data from tldr-pages