Ubuntu School – Creating a New User

There are two built-in commands for creating a user from the command-line in Ubuntu: useradd and adduser. useradd is the older command which has, for the most part, been deprecated in favour of the more user-friendly adduser command. Both will allow you to create new user accounts, set up home directories and generally move in the right direction, but adduser will prompt you for information you didn’t include whereas useradd will assume you didn’t want those things (ie create the home directory).

“`
sudo adduser theboss
“`

will produce an output similar to

“`
Adding user ‘theboss’ …
Adding new group ‘theboss’ (1001) …
Adding new user ‘theboss’ (1001) with group ‘theboss’ …
Creating home directory ‘/home/theboss’ …
Copying files from ‘/etc/skel’ …
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for theboss
Enter the new value, or press ENTER for the default
Full Name []: Joe Bossman
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] y
“`

And there you are! Happy user-creating!