Search code examples
linuxubuntusystem-administrationuser-management

How do I add a user in Ubuntu?


Specifically, what commands do I run from the terminal?


Solution

  • Without a home directory

    sudo useradd myuser
    

    With home directory

    sudo useradd -m myuser
    

    Then set the password

    sudo passwd myuser
    

    Then set the shell

    sudo usermod -s /bin/bash myuser