How to add new user in Linux
Users in Linux could be managed using command-line tools or via graphical applications. The most common command-line tools in Linux for user creation are adduser and useradd. At the same time, most desktop environments and Linux distributions will have a graphical tool that is just a frontend to these command-line tools.
Graphical methods to create user for different Linux distributions:
All these tools will eventually write related user information in /etc/passwd, /etc/group and /etc/shadow files. They'll also create user home directory and populate the home directory with necessary files stored in /etc/skel.
You can manually add user information to these files to add new users in Linux or use dedicated tools such as adduser. adduser is an interactive command-line tool that is available by default in most Linux distributions.
Steps to add new user on Linux:
Launch a terminal application.
Run adduser command with a username as argument.
$ sudo adduser username
Enter password for current user if necessary.
[sudo] password for user:
Current user needs to have administrator privilege on the system.
adduser will add the user along with other details.
Adding user `username' ... Adding new group `username' (1001) ... Adding new user `username' (1001) with group `username' ... Creating home directory `/home/username' ... Copying files from `/etc/skel' ...
Enter desired password for the user followed by [ENTER] twice.
New password: Retype new password: passwd: password updated successfully
Enter some informational values (optional) or just press [ENTER] to keep blank and proceed.
Changing the user information for username Enter the new value, or press ENTER for the default Full Name : Room Number : Work Phone : Home Phone : Other :
Press Y and [ENTER] to confirm everything is correct for adduser to really create the user.
Is the information correct? [Y/n] y
Manual: adduser(8) – Linux man page