Adding or removing a user account in Manjaro Linux is pretty easy to do. In this guide, we'll show you methods for adding and removing a user via GUI and command line.

In this tutorial you will learn:
  • How to add or remove a user from GUI (XFCE)
  • How to add or remove a user from command line
Configuring a new user in Manjaro Linux
Configuring a new user in Manjaro Linux
Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Manjaro Linux
Software N/A
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ - requires given linux commands to be executed as a regular non-privileged user

User Management via GUI

The Manjaro download page lists quite a few GUI options, and the distro supports many more. Depending on which GUI you're using (XFCE, KDE, GNOME, etc), the instructions for adding or removing a user account via GUI are going to vary a little. Since Manjaro's first recommendation is XFCE, we'll cover the instructions to add/remove a user in XFCE on Manjaro.

If you're not using XFCE as your desktop interface, the following steps and screenshots won't match up exactly for you. However, every desktop manager has its own built-in tool for managing user accounts. All you will need to do is poke around in the Settings menu to find your GUI's user management tool.

  1. First, open XFCE's application launcher, which is in the lower left corner by default. From here, open up the 'Manjaro Settings Manager' application. You can start typing the name of the app in order to find it faster.

    Locate the Manjaro Settings Manager from the application launcher
    Locate the Manjaro Settings Manager from the application launcher

  2. SUBSCRIBE TO NEWSLETTER
    Subscribe to Linux Career NEWSLETTER and receive latest Linux news, jobs, career advice and tutorials.


  3. Inside Manjaro Settings Manager, double click on 'User Accounts.'

    Open the User Accounts menu
    Open the User Accounts menu
  4. In the User Accounts menu, you'll be able to see all the current user accounts on your system, as well as delete users or create new ones. To add a new user, click on the + plus sign at the bottom left.

    Click on the plus sign to add a new user
    Click on the plus sign to add a new user
  5. Fill out the new user's username and password and click Create to save the changes. You'll be prompted for your root password before the changes take effect.

    Fill out the user setings and click Create to finalize changes
    Fill out the user setings and click Create to finalize changes


  6. To delete a user, all you need to do is highlight it from the list and click the - minus sign at the bottom left. A prompt will ask you if you'd like to preserve the user's home folder or not. If there's valuable data inside, you can keep the data but still get rid of the user. Then you'll be prompted for your root password and the account will be deleted.

    The minus sign is used to delete a highlighted user
    The minus sign is used to delete a highlighted user

User Management via Command Line

The process for adding or removing a user account from command line on Manjaro is the same as most other Linux distributions. A good thing about this method is that it will work no matter what desktop interface you're using and it gives you a lot more options for granular control.

Add a New User via Command Line



Open a terminal and type the following command to add a user (replace newuser with the account name you'd like to use):

$ sudo useradd -m newuser

The -m flag will create a home directory for the new user. In most situations, you'll want to include that option, although it's not strictly necessary.

You'll also want to make sure you set a password for the new account with the passwd command:

$ sudo passwd newuser

There are a myriad of other options that can be specified with the useradd command. For example, you can specify the user's default shell with the -s option, or add the user to one or more groups with the -g flag. It's recommended to peruse the man pages for a complete list of options.

$ man useradd

Remove a User via Command Line

You can remove a user account with the userdel command, like in the following example (replace newuser with the account name that you wish to delete):


SUBSCRIBE TO NEWSLETTER
Subscribe to Linux Career NEWSLETTER and receive latest Linux news, jobs, career advice and tutorials.


$ sudo userdel newuser

If you would like to delete the user's home directory along with the user, you just need to specify the -r option:

$ sudo userdel -r newuser

Closing Thoughts

Adding or removing a user account in Manjaro Linux is pretty straightforward, regardless of your desktop interface and whether or not you prefer the GUI method or command line interface. This guide should suffice for most situations, but if you'd like to delve deeper into Manjaro account management, read up on the usermod, chfn, and chage commands as well.

FIND LATEST LINUX JOBS on LinuxCareers.com
Submit your RESUME, create a JOB ALERT or subscribe to RSS feed.
LINUX CAREER NEWSLETTER
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
DO YOU NEED ADDITIONAL HELP?
Get extra help by visiting our LINUX FORUM or simply use comments below.

You may also be interested in:



Comments and Discussions