Follow
Ubuntu Linux

How to Add or Remove a User on Ubuntu Linux

Richard
Written by
Richard
Oct 13, 2021 Updated Mar 18, 2026 3 min read
How to Use Sticky Notes in Windows 11
How to Use Sticky Notes in Windows 11

You add or remove users on Ubuntu Linux using command-line tools like useradd or the adduser script.

Managing user accounts is essential for controlling access to your Ubuntu system, especially if multiple individuals use the same PC or you need specific accounts for services.

When you install Ubuntu, it typically creates one main administrator account that can run commands with sudo. Any additional accounts need to be manually added.

The useradd command offers fine-grained control, while the interactive adduser script guides you through the process, making it accessible for both new and seasoned users.

⚡ Quick Answer

Add users with the `adduser username` command or via Settings > Users. Remove users using `deluser username` or `deluser –remove-home username` for their files, or by selecting them in Settings > Users and clicking Remove.

How to add User from the command line

Adding a new user on Ubuntu from the command line is relatively quick and easy. To create a new user, simply invoke the adduser command followed by the username.

For example, to create a new user account named octopus, you would run the commands below:

🐧Bash / Shell
sudo adduser octopus

When you run the commands above, you’ll be asked questions about the detail of the account you’re creating. You’ll have to enter and confirm a password, but providing answers for the others is optional.

💻Code
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully
Changing the user information for octopus
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] Y

Type Y to create the account if the information you entered is correct.

With the account being created, if you want to make the account an administrator or allow the account to make changes to the machine, you’ll need to add the User to the sudo group.

Run the commands below to do so.

🐧Bash / Shell
sudo usermod -aG sudo octopus

That’s how one creates a user on Ubuntu Linux via the command line terminal.

How to add a User on Ubuntu Desktop

The steps above can be done using the desktop apps using a Ubuntu desktop. First, log in to Ubuntu and follow the steps below:

Click on System Menu’s top and select Settings, as shown in the image below.

Ubuntu user creation command line interface
ubuntu new user creation

Then scroll down to Users on the item menu and select.

Prompt for user details during Ubuntu user creation
ubuntu new user creation 1

Next, click Unlock at the top right to edit or create new user accounts.

Confirmation screen after adding a new user in Ubuntu
ubuntu new user creation 2

The Unlock button becomes Add Users. To add a new user, click Add Users and provide the user account details.

Ubuntu terminal showing user creation success message
ubuntu new user creation 3

Then provide the User’s full name and username and password.

User account details input screen in Ubuntu
ubuntu new user creation 4

When you add the account details, click Add as shown Above.

If you want the account to be a member of the administrator group, click the Administrator tab to add the User.

How to delete a user on Ubuntu Linux

In Ubuntu, you can use two commands to delete a user accountuserdel and its friendly interactive frontend tool: deluser.

To delete the example user created above, run the commands below:

🐧Bash / Shell
sudo deluser octopus

The command above will delete the User but not their files. To delete the User and files, run the commands below.

🐧Bash / Shell
sudo deluser --remove-home octopus

Using an Ubuntu desktop, the same can be performed from the User settings window above. Select the user account and click Remove.

That should do it!

Conclusion:

  • Adding or removing users in Ubuntu Linux is a straightforward process, whether using the command line or the desktop interface.
  • The adduser command is recommended for creating new users due to its interactive nature.
  • It is important to manage user permissions effectively, especially when granting sudo privileges for administrative tasks.
  • Deleting a user can be done without affecting their files, or you can choose to remove associated files as well.
  • Understanding user management helps maintain security and organization within your Ubuntu system.

Was this guide helpful?

Was this helpful?
Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

📚 Related Tutorials

How to Delete a User Account in Windows 11
Windows How to Delete a User Account in Windows 11
How to Install GNOME Desktop on Ubuntu 24.04
Ubuntu Linux How to Install GNOME Desktop on Ubuntu 24.04
How to Install KDE Desktop on Ubuntu 24.04
Ubuntu Linux How to Install KDE Desktop on Ubuntu 24.04

No comments yet — be the first to share your thoughts!

Leave a Comment

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