Arch Linux User Groups - ryzendew/Linux-Tips-and-Tricks GitHub Wiki
Arch Linux User and Groups Guide
Complete beginner-friendly guide to user and group management on Arch Linux, including creating users, managing groups, permissions, and user administration.
Table of Contents
User Management
Create User
Add user:
# Create user
sudo useradd -m -G wheel username
# Set password
sudo passwd username
Modify User
Modify user:
# Change shell
sudo usermod -s /bin/zsh username
# Add to group
sudo usermod -aG group-name username
# Lock account
sudo usermod -L username
# Unlock account
sudo usermod -U username
Delete User
Remove user:
# Remove user
sudo userdel username
# Remove with home
sudo userdel -r username
Group Management
Create Group
Add group:
# Create group
sudo groupadd group-name
# Add user to group
sudo usermod -aG group-name username
Common Groups
Important groups:
- wheel: Sudo access
- audio: Audio devices
- video: Video devices
- optical: Optical drives
- storage: Storage devices
- scanner: Scanners
- lp: Printers
Delete Group
Remove group:
# Remove group
sudo groupdel group-name
Permissions
File Permissions
Set permissions:
# Change permissions
chmod 755 file
chmod u+x file
chmod g-w file
# Recursive
chmod -R 755 directory
Ownership
Change ownership:
# Change owner
sudo chown user:group file
# Recursive
sudo chown -R user:group directory
User Administration
User Information
Get user info:
# User info
id username
# List users
cat /etc/passwd
# List groups
cat /etc/group
Sudo Configuration
Configure sudo:
# Edit sudoers
sudo visudo
# Ensure wheel group
%wheel ALL=(ALL) ALL
Summary
This guide covered user management, group management, permissions, and user administration.
Next Steps
- Arch Linux System Configuration - System setup
- Arch Linux Security Configuration - Security
- ArchWiki User Management: https://wiki.archlinux.org/title/Users_and_groups
This guide is based on the ArchWiki. For the most up-to-date information, always refer to the official ArchWiki.