Linux User Basics
Introduction to Linux Users
In Linux systems, users are fundamental entities that interact with the operating system. Each user has a unique identity and set of permissions that control access to files, directories, and system resources. Understanding user basics is crucial for system administration and security management.
User Identification
Every user in Linux is identified by two key attributes:
graph TD
A[User] --> B[UID: Unique Numeric Identifier]
A --> C[Username: Human-Readable Name]
To view basic user information, you can use several commands:
- id command
$ id
uid=1000(labex) gid=1000(labex) groups=1000(labex)
- whoami command
$ whoami
labex
User Types in Linux
Linux distinguishes between different types of users:
User Type |
UID Range |
Description |
Root User |
0 |
System administrator with full privileges |
System Users |
1-999 |
Used for system services and background processes |
Regular Users |
1000+ |
Normal user accounts for human interaction |
User Account Management
Linux provides commands to manage user accounts:
- Creating a new user
$ sudo adduser newuser
- Modifying user properties
$ sudo usermod -aG sudo newuser
- Deleting a user
$ sudo userdel newuser
User Home Directories
Each user typically has a home directory located in /home/username
, which serves as their personal workspace and configuration storage.
graph TD
A[/home] --> B[username1]
A --> C[username2]
A --> D[username3]
Key Concepts for LabEx Users
When working in LabEx environments, understanding user basics helps you:
- Manage system access
- Implement security practices
- Understand file ownership and permissions
Conclusion
Mastering Linux user basics is essential for effective system management and security. By understanding user identification, types, and management techniques, you can confidently navigate Linux systems.