Categories: Ubuntu

How to Create, Update, and Delete Users in Ubuntu 22.04

In Ubuntu, there is a feature for the administrative user that can add, update, or delete the users in Ubuntu. Different users are being added to Ubuntu to perform tasks; however, at any stage, the privileges of users can be updated. Similarly, they can be deleted in Ubuntu as well.

In this write-up, methods are discovered by which the users can be created, updated, and deleted in Ubuntu 22.04.

How to Create, Update, and Delete Users in Ubuntu 22.04?

The method of creation, updating, and deletion of the Users using the terminal have been explained in detail in different sections, first open the terminal by using the shortcut key of CTRL+ALT+T:

The terminal has been opened.

How to Create Users in Ubuntu 22.04?

For the creation of users in Ubuntu, we will follow the general syntax mentioned below:

$ sudo useradd -m [username]

Following the above command, only replace the “[username]” with the username, and the “-m” option is used to create the newly created user’s home directory, for example, if a user with the name “Paul” is supposed to be added in Ubuntu, the above command will be changed:

$ sudo useradd -m Paul

The user has been created, however, to make the user account more secure, set a password using the command:

$ sudo passwd Paul

When the command is being executed, it will ask to set a password, then to re-type the password to match both passwords.

How to Update Users in Ubuntu 22.04?

When the user is created, and some privileges of the user are supposed to be updated, which one is granting the user the administrative privileges. These privileges can be granted by adding the user in the sudoers group by running the command:

$ sudo usermod -a -G sudo Paul

Similarly, to change the password of user Paul, run the command:

$ sudo passwd Paul

The password of the user Paul has been updated.

How to Delete Users in Ubuntu 22.04?

To delete the user from the user, use the command of userdel, for example, in order to remove the user “Paul” run the command:

$ sudo userdel -r Paul

The user will be deleted with the execution of the above command.

Conclusion

The commands adduser and deluser are used to create and delete the users in Ubuntu 22.04, and to update their password, use the command passwd. In this blog, the creation, updating, and deletion of the users have been explained in Ubuntu 22.04.

Ubuntu Server Admin

Recent Posts

AWS IoT Greengrass comes to Ubuntu Core

AWS’s open source edge run time meets Canonical’s fully containerized OS for devices delivering a…

10 hours ago

Tutorial: getting started with AWS IoT Greengrass on Ubuntu Core

We recently announced that you can now benefit from the combined power of Ubuntu Core…

10 hours ago

🚀 Deploy ScyllaDB on Ubuntu VPS

This article provides a guide to deploy ScyllaDB on Ubuntu VPS. What is ScyllaDB? ScyllaDB…

2 days ago

How to Harden Security of VPS Server

This article demonstrates how to harden security of VPS server and is intended for server…

3 days ago

How to install Wget on Ubuntu 24.04

In this blog post, we will guide you on how to install wget on Ubuntu…

4 days ago

Xfwl4 – The roadmap for a Xfce Wayland Compositor

Jan 27,2026 Xfwl4 - The roadmap for a Xfce Wayland Compositor We, the Xfce team…

7 days ago