How to Create and Delete Users on Ubuntu

Several ways to create a user on Ubuntu and other useful commands.

How to Add a User

In the example below, we will create the user ploshadka.

a) adduser

Then we create a password, answer typical questions.

b) useradd

useradd -m -s /bin/bash ploshadka

Set a password:

In both cases, a user directory will be created:

Sudo Group for a User

Use next command to add the user ploshadka to the sudo group:

usermod -aG sudo ploshadka

How to Delete a User

If you need to delete a user:

Logging In as a New User

This can be done in one of the ways:




If you need exit to the root user:

Similar Posts

Leave a Reply

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