/ factorpad.com / tech / linux-essentials / adduser-command.html
An ad-free and cookie-free website.
Beginner
Learn to add users at the Linux command line.
Videos can also be accessed from the Linux Essentials Playlist on YouTube.
Linux adduser Command Summary with Examples (3:26)
Our eighty-first word, or command to memorize is
adduser
from our category
Users.
adduser
allows you to add users and
groups.
-options | description |
---|---|
-h ,
--help |
Print help screen |
--system |
Set up system users |
--group |
Add new group |
Recall from recent videos (tutorials) on we're learning superuser administrative tasks and functions, and now we'll tacking on adding new users.
Before we start, it helps to think of commands as mini programs and
most follow this structure:
command -option(s) argument(s)
.
The adduser
command has
20 options, and the argument is the user or group to
add or maintain in some way. Please note, there is a similar tool
called useradd
used on some
distributions.
Like most commands, help is available with double-dash
--help
. New system users can be added
with the --system
option. Groups are
managed with the --group
with
sudo
out front of course.
So why is adduser
an important command?
Well, system admins should plan for user growth.
And now you know how to do that.
Okay, the best way to embed this in your memory is by typing in your own terminal window.
Find this on your Mac using a program called Terminal. On Linux use Terminal or Konsole, and currently Microsoft is adding this functionality to Windows.
Here we go. I don't typically jump right in to documentation in this
section, taking time away from exercises, but this one is designed
very well and lays out the five capabilities of
adduser
(Found using
adduser --help
).
First add normal user, then and a system user, add a user group, add a system group and add users to groups. Very descriptive.
And because that's a lot, we'll just tackle a couple, first
sudo adduser yulie
and watch.
A template or skeleton of files is copied to the new user's directory, and I need to fill in a few fields that go into a file of course.
And the directory contents we'll review with an
ls -a
in that new directory.
And last, add Yulie to the users group.
And last, verify by asking for her ID.
Very good.
Okay now you know how to use adduser
.
And you know the syntax for commands, options and arguments.
One last tip about the adduser
command. So explore user admin programs available on your system.
That other option useradd
has a lot
of the same functionality.
Okay, thanks for visiting today. I hope this was a helpful
introduction to the adduser
command.
For an overview of the 100 videos, the 8 quizzes, a cheat sheet, the categories and a Q&A section, visit:
We like to have a little fun on our YouTube Channel, subscribe and join to be part of it.
passwd
command,
hit Back.ping
command, click Next./ factorpad.com / tech / linux-essentials / adduser-command.html
A newly-updated free resource. Connect and refer a friend today.