How to add user in Ubuntu?

In particular, what commands do I run from the terminal?

+48
linux ubuntu sysadmin user
Sep 01 '08 at 18:59
source share
3 answers

Without a home directory

sudo useradd myuser 

With home directory

 sudo useradd -m myuser 

Then set a password

 sudo passwd myuser 

Then install the shell

 sudo usermod -s /bin/bash myuser 
+105
Sep 01 '08 at 18:59
source share

Here is the command that I almost always use (adding kevin user):

 useradd -d /home/kevin -s /bin/bash -m kevin 
+27
Jan 17 2018-10-17 at
source share

Basically 2 teams for this ...

  • useradd
  • adduser (which is an earlier interface for useradd)

You must run them using root. Just read their manuals to find out how to use them.

+15
Sep 01 '08 at 19:03
source share



All Articles