The purpose of this tutorial is to explain how to add user on Ubuntu 20.04 Focal Fossa Linux. The guide will provide instructions on how to add user on Ubuntu using graphical user interface, and, also how to create user using a command line.

In this tutorial you will learn:
  • How to add user from command line
  • How to add user from graphical user interface
  • How to add user to group
  • How to retrieve user and group information
How to add user on Ubuntu 20.04 Focal Fossa Linux
How to add user on Ubuntu 20.04 Focal Fossa Linux

Software Requirements and Conventions Used

Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Installed or upgraded Ubuntu 20.04 Focal Fossa
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

How to add user on Ubuntu 20.04 step by step instructions

Add user from command line

Regardless whether you use Gnome, KDE desktop or you are running Ubuntu server you can always easily add new user from command line.

  1. For example the bellow adduser command will add new use named lubos to the system:
    $ sudo adduser lubos
    Adding user `lubos' ...  
    Adding new group `lubos' (1001) ... 
    Adding new user `lubos' (1001) with group `lubos' ...
    Creating home directory `/home/lubos' ...
    Copying files from `/etc/skel' ...
    Enter new UNIX password: 
    Retype new UNIX password: 
    passwd: password updated successfully
    Changing the user information for lubos
    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
    
    The user information is optional as the only required input is the new user password.
  2. (optional) Depending on your system and the environment you might need to add user to a specific group. For example the following command will add user lubos to group cdrom:
    $ sudo usermod -aG cdrom lubos
    
    NOTE
    To list all available system groups enter cat /etc/group command into your terminal window.
  3. (optional) Lastly, retrieve user and group information to confirm the successful user creation:
    $ id lubos
    uid=1001(lubos) gid=1001(lubos) groups=1001(lubos),24(cdrom)
    

Add user from graphical user interface (GUI)



  1. Search Activities menu using user string and open Users settings
    Search Activities menu using user keyword and open Users settings


  2. Hit Unlock to obtain administrative privileges
    Hit Unlock to obtain administrative privileges
  3. Enter administrative password. Note, your user needs to be a part of sudo group to successfully authenticate
    Enter administrative password. Note, your user needs to be a part of sudo group to successfully authenticate


  4. Click on Add User button
    Click on Add User button


  5. Fill all the required information as well as account type and hit Add button
    Fill all the required information as well as account type and hit Add button
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.