-
-
Notifications
You must be signed in to change notification settings - Fork 2
Linux User Groups
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to user and group management on Linux, covering Arch Linux, CachyOS, and other distributions including creating users, managing groups, permissions, and user administration.
Add user:
# Create user
sudo useradd -m -G wheel username
# Set password
sudo passwd usernameModify 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 usernameRemove user:
# Remove user
sudo userdel username
# Remove with home
sudo userdel -r usernameAdd group:
# Create group
sudo groupadd group-name
# Add user to group
sudo usermod -aG group-name usernameImportant groups:
- wheel: Sudo access
- audio: Audio device access
- video: Video device access
- lp: Printer access
- scanner: Scanner access
Modify group:
# Add user to group
sudo usermod -aG group-name username
# Remove user from group
sudo gpasswd -d username group-nameSet permissions:
# Set permissions
chmod 755 file
# Set ownership
sudo chown user:group fileSet directory permissions:
# Set permissions
chmod 755 directory
# Recursive
chmod -R 755 directoryList users:
# List users
cat /etc/passwd
# List logged in
who
# List with details
wCheck user:
# User info
id username
# Groups
groups usernameFix permissions:
# Check permissions
ls -l file
# Fix ownership
sudo chown user:group fileAdd to group:
# Add to group
sudo usermod -aG group-name username
# Log out and back inThis guide covered user and group management for Arch Linux, CachyOS, and other distributions, including creating users, managing groups, and permissions.
- Security Configuration - Security setup
- System Configuration - System setup
- ArchWiki Users and Groups: https://wiki.archlinux.org/title/Users_and_groups
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.