Here's a concise guide for creating new Linux users:
Method 1: Using `adduser` (Recommended for Simplicity)
- Execute:
sudo adduser newusername
- Follow prompts to set password and optional user info (Full Name, etc.).
- Automatically creates home directory (
/home/newusername
) and user group.
Method 2: Using `useradd` with Manual Configuration
Basic Creation:

-
sudo useradd -m newusername
-m
: Creates the user's home directory.
Set Password:
-
sudo passwd newusername
- Enter and confirm the new password securely.
Common Options with `useradd`
- Specify Home Directory:
sudo useradd -m -d /custom/path/newusername newusername
- Assign Specific Login Shell:
sudo useradd -m -s /bin/bash newusername
- Add to Supplementary Group(s):
sudo useradd -m -G group1,group2 newusername
Verification and Confirmation
- Check User Details:
id newusername
- Verify Home Directory:
ls -ld /home/newusername
- Test Login:
su - newusername
Notes:

- Always use
sudo
for user creation/modification tasks. - The
adduser
script is higher-level and often simpler than directuseradd
. - Passwords set via
passwd
are encrypted and stored in/etc/shadow
.