How to Add and Remove Users on Ubuntu 20.04

Ubuntu

Wondering how to add and remove users on Ubuntu 20.04 LTS?

Ubuntu 20.04 LTS is becoming the go-to Linux distribution for most users. With its easy-to-navigate GUI, enhanced stability, regular maintenance, and optimized performance, Ubuntu 20.04 LTS is on its way to becoming the most used Linux distribution of all time.

As Ubuntu 20.04 LTS becomes the choice for many desktops, it’s understandable that there may be multiple users for a single device. Each user may want to customize the system according to their liking. Furthermore, each user might require a different set of folders, for example, documents, pictures, videos, etc.

Add and Remove Users on Ubuntu

In cases like these, you’d want to create more users for your device. Additionally, you might want to give multiple users certain privileges that are specific to a group. You may also make temporary users that you’d like to get rid of later for better performance. 

If you’re looking to learn how to add and remove users on Ubuntu 20.04 LTS, this guide will help. Just follow the steps in this guide and you’ll be setting up users in a few clicks or lines (depending on what method you choose).

Now that the pieces are in play, let’s begin!

1. Adding and Removing Users Using the Terminal.

The first method makes use of the Command Line Interface. You can add users with the help of the $ adduser or $ useradd command. 

The $ adduser command creates a new user along with all the necessary requirements. By requirements, we mean that adduser will automatically create a new user with all the important directories, groups, passwords for security, etc. The $ useradd command will only create a new user without creating the directories, passwords, etc (unless we use the necessary flags).

For this method, we’ll use the $ adduser command as it is more reliable. To add a user, follow these steps.

  1. Open the Terminal by pressing Ctrl + Alt + T.
  2. Type the following command:
$ sudo adduser <username>

For example:

$ sudo adduser ubuntu11
sudo adduser code

This will begin the process of creating a new user.

  1. Type the new password for the user.
  2. The system will automatically create the user, at the end, it will ask you for additional information on the user. If you wish to leave them blank press Enter.
  3. Press Y and hit the Enter key to confirm your changes. 
Add and Remove Users on Ubuntu

With the steps followed correctly, you should now have created a new user. If you log out of your system, you should see the additional user on the Login screen. 

Removing a user is pretty similar to this method as well. Just follow these steps to remove a user.

  1. Open the Terminal by pressing Ctrl + Alt + T.
  2. Type in the following command:
$ sudo deluser <username>

For example:

$ sudo deluser ubuntu1
deluser

This will delete the user. However, it does not get rid of the Home directory. If you wish to delete the Home directory as well, then type the following.

$ sudo deluser --remove--home <username>

For example:

$ sudo deluser --remove--home ubuntu1

This will remove both the user and the Home directory.

If you followed the steps correctly, you should now have deleted the user from your system. You should now have a general understanding of how to add and remove users on Ubuntu 20.04 LTS. If you feel like the CLI method is not for you, you can opt for a more graphical approach.

2. Adding and Removing Users Using the GUI.

If the previous method seemed a little overwhelming to you then you can try a more user-friendly approach. It’s time for the GUI method to shine. Ubuntu 20.04 LTS comes with a fast and reliable GUI whose execution of operations is on par with that of the CLI.

Ubuntu 20.04 LTS allows you to add and remove users with the help of the GUI. The method is simple, easy-to-understand, and will only take a few steps to get the job done.

Follow these steps to add a user to your Ubuntu system.

  1. First, click on the Show Applications icon on your Ubuntu desktop.
Add and Remove Users on Ubuntu
  1. Next, click on the Settings icon or type ‘Settings in the search bar.
Add and Remove Users on Ubuntu
  1. Once you’re in the Settings window, navigate to the Users tab.
  2. Click on the Unlock button on the top right corner of the window.
Click on the Unlock button on the top right corner of the window.
  1. Type in your password and press Authenticate.
Add and Remove Users on Ubuntu

A new option should appear in place of Unlock.

Add and Remove Users on Ubuntu
  1. Once that is finished, click on Add User. A menu should appear. Fill in the necessary details and click on Add.
Add and Remove Users on Ubuntu
  1. Type in your password and press Authenticate. This will create a new user.
Add and Remove Users on Ubuntu

With the steps followed correctly, you should have added a new user in Ubuntu. 

If you wish to delete a user in Ubuntu 20.04 LTS, that is accomplishable with the help of the GUI.

To remove a user from Ubuntu, follow these steps.

  1. First, click on the Show Applications icon on your Ubuntu desktop.
  2. Next, click on the Settings icon or type ‘Settings in the search bar.
Add and Remove Users on Ubuntu
  1. Once you’re in the settings window, navigate to the Users tab. Click on the Unlock button on the top right corner of the window.
  2. Type in your password and press Authenticate.
Add and Remove Users on Ubuntu

A new option should appear in place of Unlock.

  1. Once that is finished, click on Remove User.
remove user

7. Choose the option most suited for you. If you wish to delete the user with all its relevant files, click on Delete Files.

Add and Remove Users on Ubuntu

This will remove the newly added user as shown in the image below:

remove newly added user

If you followed the steps correctly, then you should have successfully removed the user from your system. 

We hope this guide helped you learn how to add and remove users on Ubuntu 20.04 LTS. If you followed all the steps and methods mentioned in this article, you should now have a decent idea of adding and removing users with the help of both the terminal and the GUI. Additionally, we wish you all the best in your journey to master Linux.

Furthermore, if you wish to find out how to enable ZFS compression in Linux, click here.

If you liked this article, please share it. 🙂

Leave a Reply

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

Previous Post

How to Fix Playstation Network Services Crashing

Next Post

How to Fix PS4 Freezing Randomly While Browsing or Playing

Related Posts