How to Add and Remove Users in Debian

How to Add and Remove Users in Debian

The user’s account management in which adding and removing a user from the Linux system is included in the responsibilities of the Linux administrator. Administrators can perform this job using both ways either using the command line or using the graphical environment. We will explain both two different methods in this article for adding and removing a user from the Debian 10 system.


To add or remove a user from the Debian system, the user needs administrative or sudo privileges.

Add user through the command line on Debian 10

Open the terminal using the start menu of your Debian system. Use the below-mentioned syntax to add a user to your system:

$ sudo adduser UserName

For example, fro adding the new user ‘karim’ on the Debian system, the above command will apply into the following form:

$ sudo adduser karim

On the execution of the above-mentioned command, you will be asked to enter the sudo password. Enter ‘sudo’ account password and then hit ‘Enter’. Enter the new password for the new user and for confirmation, re-type the password again. The message will show on the terminal window that ‘password is updated successfully. Now, enter the remaining necessary information of the user such as the user’s full name, room number, phone details, etc. after that, confirm these details by pressing the ‘y’ if all information is correct and then press ‘Enter’.

The new user is now created on Debian 10 system.  For verification, access the Debian 10 user’s management section.

Add user using the Graphical interface o Debian 10

To add a new GUI, click on the Debian start menu and choose the setting icon from the displaying items list.

Now, type ‘users’ in the search bar. The following displayed user’s section will show on the desktop:

Click on the ‘Unlock’ to add a new user, which is also shown in the following displayed image:

The following authentication dialog will display on the desktop window. Type the administrator password for the authentication and click on the ‘authenticate’ button.

Now, click on the ‘Add user’ button to add a new user to the Debian 10 system.

Enter the required information for adding a new user on the displaying the dialog such as the account type, users full name, password, etc. After giving the all information, click on the ‘Add’ option.

You will see on the displaying window that the user is added to your system successfully.

Remove user through the command line or Terminal from Debian 10

To remove a user through the terminal, use the below-given syntax:

$ sudo deluser {username}

Enter the user name that you want to remove from the system. For example, to remove a user ‘karimbuzdar’ from the Debian system.

$ sudo deluser karimbuzdar

For removing a user along with the user’s directory then, type the below-mentioned command:

$ sudo deluser --remove-home username

To remove the user along with all associated files then, use the below-given command:

$ sudo deluser --remove-all-files username

Change the user name with your own name of the user that wants to remove.

Remove user using GUI on Debian 10

To remove a user from your Debian system, click on the ‘settings’ icon.

Type ‘users’ in the search bar to search the user’s section. The following user’s window should display on the desktop:

Click on the ‘Unlock’ button to remove a user.

Enter the sudo or administrative login account password to authenticate the user and then choose the ‘authenticate’ button.

Now, choose the user that you want to remove from the Debian system and then click on the ‘Remove user’ button to remove this user.

The following prompt will show the displaying window. If you want to remove all associated files with this user then, click on the ‘Delete files’ button to remove the user.


We have seen in this article how you can easily remove or add a new user to your Debian 10 system. We have elaborated both methods for doing this job either by using the Terminal or through the Debian GUI.


Similar Posts