🐧 Day 10/30 —
#Linux
Linux is a multi-user operating system designed to allow multiple people and services to work securely on the same machine.
Managing users properly is one of the most important responsibilities of a Linux administrator.
Linux User Management – Adding, Modifying, and Deleting Users
Every user in Linux has a unique username, user ID (UID), home directory, and set of permissions.
Essential User Management Commands:
→ useradd
→ passwd
→ usermod
→ userdel
→ id
→ whoami
Adding a User
→ sudo useradd john
Creates a new user named john.
To set a password:
→ sudo passwd john
Linux will prompt you to create and confirm a password.
Viewing User Information
→ id john
Displays the user's UID, GID, and group memberships.
→ whoami
Displays the currently logged-in user.
Modifying a User
→ sudo usermod -l johnny john
Changes the username from john to johnny.
→ sudo usermod -aG developers john
Adds the user john to the developers group.
Deleting a User
→ sudo userdel john
Removes the user account.
→ sudo userdel -r john
Removes the user account and deletes the user's home directory.
Understanding User Groups
Groups simplify permission management by allowing multiple users to share access to files and resources.
Examples:
→ developers
→ admins
→ docker
Instead of assigning permissions individually, administrators can manage access through groups.
Why User Management Matters:
→ Improve system security
→ Control resource access
→ Manage team environments
→ Protect sensitive files
→ Administer Linux servers effectively
Mastering user management is a foundational skill for Linux administrators, DevOps engineers, cloud engineers, and cybersecurity professionals.
🐧 Grab Linux Ebook:
codewithdhanian.gumroad.com/…
#Linux #LinuxTutorial #LinuxCommands #UserManagement #SystemAdministration #DevOps #CloudComputing #CyberSecurity #OpenSource #100DaysOfCode