Create user using Linux CLI

When you use GUI, it is easy process to create user and I will describe it once. Now I`ll show hot to do it using CLI. Most important thing is to be root user in order to create user.

Connect o your Linux or start Terminal and type following:

ittut@ubuntu:~$ adduser admin

Use command adduser, although you can use useradd to. You will be prompt for root password. Now you can observe process of creation and after all you will be prompt for user password:

Adding user `admin’ …
Adding new group `admin’ (1002) …
Adding new user `admin’ (1002) with group `admin’ …
Creating home directory `/home/admin’ …
Copying files from `/etc/skel’ …
Enter new UNIX password:

Type and retype password. Then, system will asks you few more details although it`s mandatory to answer.

Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:

Is the information correct? [Y/n]

Confirm with Y if you are finished.

To verify creation process type:

cat /etc/passwd

This command will list all users.

That`s it, keep an eye on as we will continue with more tutorials . On our website you will find a lot of tips and tricks for any IT field !


Dejan Dzodan

Dejan Dzodan

IT professional for more then 15 years, mostly in financial institutions but with experience in ISP and retail. Proven in networking and overall infrastructure projects. Cisco instructor.

Leave a Reply

Your email address will not be published. Required fields are marked *

9 + 5 =