Today, in this article, we show you how to insert new users in linux. On Linux, the useradd command is the default command used to add new users. Most Linux distributions use the useradd command to manage users, although some, such as Ubuntu, also offer the adduser command. The main distinction between these two commands is that adduser is merely a reference command for useradd, but useradd is the default command included in the base Linux package.
Distributions like Ubuntu have developed a new command called adduser that works as a symbolic link with the standard useradd command. Any file on your system that contains a reference to another file is known as a symbolic link. You can say that adduser and useradd are the same command with a different name. Every Arch based distribution uses the useradd command, while Ubuntu uses adduser. Below are the steps to add new users to Linux.
Steps to Add New Users to Linux
Step 1: launch a terminal application.
Step 2: Run add user command with a username as an argument.
$ sudo adduser username
Step 3: Type the password for the current user, if necessary.
[sudo] password for user:
Step 4: add user 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’ …
Step 5: Enter the desired password for the user followed by [ENTER] twice.
New password:Retype new password:passwd: password successfully updated
Step 6: Type some informative values (optional) or just press [ENTER] to leave blank and proceed.
Changing User Information to UsernameType the new value or press ENTER for the default full name []:Room number []:To work Phone []:Home Phone []:Other []:
Step 7: Press s and [ENTER] to confirm that everything is correct for add user to actually create the user.
Is the information correct? [Y/n] and
Final Words
We hope you like our article about how to add new users to Linux. The most popular command available on Linux is “useradd” or “adduser”. It allows you to create new users or add existing ones to the Linux system, each with features. Depending on the access they have, some of these people can access certain files or directories. Every time a user is created or added, access is granted to that user as per the requirements.