How to Create and Manage Users on Linux Server (Beginner-Friendly Guide)
Welcome back to another easy and friendly Linux Server tutorial!
In this lesson, we’ll learn one of the most important things every server owner must know:
👉 How to create, manage, delete, and control users on a Linux system.
You don’t need to be a sysadmin.
You don’t need deep knowledge.
Just follow the steps calmly — even total beginners can do this.
Let’s begin!
🧩 Why User Management Matters in Linux
Linux is a multi-user system.
That means you can create different accounts for different people, apps, and services.
Reasons why user management is important:
-
Improves security
-
Controls what each user can access
-
Helps you organize your server
-
Prevents accidental damage by restricting permissions
-
Required for real DevOps or sysadmin work
If you're running a VPS (DigitalOcean, Linode, IDCloudHost, AWS, or anything), this tutorial is mandatory knowledge.
🧱 Step 1: Checking Your Current User
Before creating new users, let’s see who we are.
Run:
This will show your current logged-in user.
Most of the time on a newly installed server, you're using:
The root user is the most powerful account — so be careful!
👤 Step 2: How to Create a New User
To create a new user, run:
Example:
Linux will ask:
-
Full name
-
Phone number
-
Other info
You can just press ENTER through all of them.
This command automatically creates:
-
A home directory
-
Default shell
-
User folder permissions
Super easy! 🎉
🔐 Step 3: Set or Change Password for a User
To set a password:
Example:
Enter the new password twice.
Done!
⭐ Step 4: Give a User Sudo Access (Administrator Privileges)
If you want the new user to be able to run admin commands:
Example:
This adds the user to the sudo group, which means they can do administrative tasks.
📂 Step 5: How to Switch to Another User
Use:
Example:
Now you're logged in as that user.
🗑️ Step 6: How to Delete a User
To delete a user:
To delete the user and their home directory:
Be very careful!
Deleting a user with --remove-home removes everything they own.
🔍 Step 7: List All Users on the System
You can check all system users:
Or a cleaner list of human users:
📦 Step 8: Creating Groups
Groups help manage permissions.
To create a group:
Example:
👥 Step 9: Add a User to a Group
Example:
🚫 Step 10: Lock & Unlock a User Account
Lock account (disable login):
Unlock account:
Very useful if someone leaves your team.
💾 Bonus: View User Info
To check a user’s full info:
To view their home folder:
🔥 Conclusion
You’ve now mastered the essential user management commands on Linux:
✔ Add new users
✔ Set passwords
✔ Give sudo permissions
✔ Add/remove groups
✔ Delete users safely
✔ Lock/unlock accounts
This is core sysadmin knowledge, and you’re now one step closer to becoming a confident Linux server user.
If you're running a VPS or managing hosted services, these commands will be incredibly useful.