How to add users to a system?#
The command used to create a new user is called useradd.
Just by running useradd your_user a new user named your_user will be created, but you probably want to add some parameters.
The options of the useradd command are:
-mThis will create a home directory in/home/your_user-G group_namewill add the newly created user to the here specified groups (wheelis an often used group since it allows the user to usesudo)-s path/to/shellchanges the default shell of the user. The available shells and their paths can be checked withcat /etc/shells. If the shell you want to use is not available it can be installed using the OSs package manager.
Modifying an existing user#
In case you forgot to set something when creating the user, you can do that afterwards using the usermod command.
-aGto add another group to a user-sto change the users default shell
For any additional options you might want to know you can always check the man pages using man usermod or any other command.