How to create a user in Linux

How to create a user in Linux

HomeGames, Guides, How toHow to create a user in Linux

Creating users is one of the most basic tasks in Linux. System administrators must constantly manage users as the size of the company grows or shrinks. Or you might want to add a user in Linux to allow one of your family members to use your computer and prevent them from accessing your personal data. Whatever the case may be, in this guide let's look at how to create a user in Linux. There are two ways to create a new Linux user and we have explained both with the help of examples.

#19 – Linux for DevOps – Create a User | useradd command | How to add a user on Linux

Creating a new Linux user using the useradd command is the oldest method. Before we start with the same, you can first list all Linux users to check if the user you are trying to add already exists. There are four ways to list users but the most common command is the following.

If you don't see the user here, you can continue adding them using the useradd command. Here is the syntax for the useradd command:

Let's explain the usage of each entity in the above command one by one.

Tagged:
How to create a user in Linux.
Want to go more in-depth? Ask a question to learn more about the event.