DAY 11-Linux User & Group Management – Master the Foundation of System Control"
Linux User & Group Management – Master the Foundation of System Control
Managing users and groups is the first step to becoming a Linux power user. These commands allow you to control who can do what on your system. Below is a practical guide with real-life analogies to help you remember and understand each command better.
sudo – Superuser Do
Command:
Purpose: Gives temporary admin (root) access to execute critical system-level commands. Real-Life Analogy: Like borrowing your dad’s car – you need special permission to drive.
useradd – Add a New User
Command:
Purpose: Creates a new user account. Real-Life Analogy: Like adding a new employee to your office system.
whoami – Know Your Identity
Command:
Purpose: Displays the currently logged-in username. Real-Life Analogy: Asking the system, “Who am I?”
su – Switch User
Command:
Purpose: Switch to another user account. Real-Life Analogy: Like logging into your colleague's desktop without logging out of yours.
passwd – Set or Change Password
Command:
Purpose: Changes or sets a user’s password. Real-Life Analogy: Like changing the PIN of your ATM card.
Recommended by LinkedIn
userdel – Delete a User
Command:
Purpose: Removes a user from the system. Real-Life Analogy: Like removing an ex-employee’s login access.
groupadd – Add a New Group
Command:
Purpose: Creates a new user group. Real-Life Analogy: Like making a new department in your company.
gpasswd -a – Add User to Group
Command:
Purpose: Adds a user to a specific group. Real-Life Analogy: Assigning an employee to a team.
gpasswd -M – Add Multiple Users to Group
Command:
Purpose: Adds multiple users to a group at once. Real-Life Analogy: Like sending invites to multiple people at the same time.
groupdel – Delete a Group
Command:
Purpose: Deletes an existing user group. Real-Life Analogy: Like closing a department that’s no longer needed.
Practice each command on your AWS EC2 or local Linux machine. After executing, take a screenshot and upload it below each section for interactive learning.
These commands may look small, but they give you huge control over your Linux system. Mastering them is the first milestone toward becoming a Linux pro.