useradd Command Examples

Create a new user. See also: users, userdel, usermod. More information: https://manned.org/useradd.

sudo useradd {{username}}

sudo useradd {{[-u|--uid]}} {{id}} {{username}}

sudo useradd {{[-s|--shell]}} {{path/to/shell}} {{username}}

sudo useradd {{[-G|--groups]}} {{group1,group2,...}} {{username}}

sudo useradd {{[-m|--create-home]}} {{username}}

sudo useradd {{[-k|--skel]}} {{path/to/template_directory}} {{[-m|--create-home]}} {{username}}

sudo useradd {{[-r|--system]}} {{username}}