Home / Computer / 2 How to Create New User on Linux for Beginners (Complete + Image)

2 How to Create New User on Linux for Beginners (Complete + Image)

User management is important in an operating system such as on a Linux operating system. Each user has at least a separate account when accessing Linux so that each user has their own user and home folder. This will also prevent damage and access to data or files by unauthorized parties. In other words, each user must have private publicly distributed data

. With the user management, users can set rights access from each file / folder in the form of access rights for owner (owner), group and public (general). In addition, users can also set permissions on other users such as which user has access rights as administrator (root) or regular user

In short, Ubuntu Linux provides a multi user account that allows you create many users in an Ubuntu operating system. How do I create a new user on Ubuntu Linux? For more explanation let's see the explanation below

How to Create a New User in Ubuntu Linux

Creating a new user on Ubuntu Linux is easy and simple. There are two commands you can use to create a new user in Ubuntu namely Adduser and Useradd .

What is the difference between the two?

  • useradd creates unassigned users for set / set password. Meanwhile, the adduser creates the user by setting the password first simultaneously.
  • useradd creates the user without creating the home directory. Meanwhile, the adduser creates the user along with the home directory.
  • useradd creates the user without including a full description of the user. Additionally, the adduser creates the user by including a complete description of the user.

In order to better understand the differences between the two commands, let's look at creating a new user in Ubuntu using both commands and see the difference.

A . Creating New User With Adduser Command

1. To create a new user, you must be logged in as root by including "sudo" at the beginning of the command you want to execute. Here we will create a new user with adduser with command sudo adduser . For example: sudo adduser hannani123. Then press Enter . Then, you will be asked to enter a password for your new user.

 how to create user on linux

2. After that, you will be asked to fill in information for new users such as your full name, phone number and others (you can empty the information you do not need).

 adduser 1

3. After completing the information, type "Y" as a confirmation that the information you have made is correct.

 how to create user on linux

4. Well, now, you can login with your new user account by typing sudo login command. Example: sudo login hannani123 .

 tutorial how to create user on linux

B. Creating a New User With Useradd Command

1. To create a new user, you must be logged in as root by including "sudo" at the beginning of the command you want to execute. Here we will create a new user with useradd with command sudo useradd . For example: sudo useradd nabilah. Then press Enter .

 useradd

2. Because useradd does not ask you to set a password, you can still create a password on that user by typing sudo passwd . Example: sudo passwd nabilah.

 password

3. Well, now, you can login with your new user account by typing sudo login command. Example: sudo login nabilah .

 login nabilah

4. To exit the user, type command exit .

 exit

C. Viewing All the List of Users in Ubuntu

To see all the users in your Ubuntu list you just type the cat / etc / passwd command and press Enter .

 check user

Well, the result will look like in the picture below, you can see in the last two lines there are user hannani123 and nabilah we have created before

 how to create new user in linux ubuntu  exit

So many discussions about how to create a new user on Ubuntu Linux with the Adduser and Useradd commands. Well, hopefully the discussion described above is helpful and good luck. Thanks!

Loading...

Check Also

Android Messages getting better, smarter conversation search functionality

Google is rolling out a new Android Messages feature designed to help users find previously …

%d bloggers like this: