-
-
Notifications
You must be signed in to change notification settings - Fork 1
Linux System Configuration
Complete beginner-friendly guide to configuring Linux system settings, covering Arch Linux, CachyOS, and other distributions including systemd, services, user management, system information, time, locale, and hostname.
- Systemd Basics
- Service Management
- User Management
- System Information
- Time and Locale
- Hostname Configuration
- System Maintenance
systemd is the init system and service manager.
Functions:
- Manages services
- Handles boot process
- Controls system resources
- Manages users and sessions
Main components:
- systemd: Core system manager
- systemctl: Service control
- journalctl: Log viewing
- systemd-analyze: Boot analysis
Start service at boot:
# Enable service
sudo systemctl enable service-name
# Enable and start
sudo systemctl enable --now service-nameExample:
# Enable NetworkManager
sudo systemctl enable --now NetworkManagerControl services:
# Start service
sudo systemctl start service-name
# Stop service
sudo systemctl stop service-name
# Restart service
sudo systemctl restart service-name
# Reload service (if supported)
sudo systemctl reload service-nameCheck service status:
# Check status
systemctl status service-name
# Check if running
systemctl is-active service-name
# Check if enabled
systemctl is-enabled service-nameSee Systemctl Troubleshooting for detailed guide.
Add user:
# Create user
sudo useradd -m -G wheel username
# Set password
sudo passwd usernameConfigure sudo:
# Edit sudoers
sudo visudo
# Ensure wheel group has sudo
%wheel ALL=(ALL) ALLSee User and Groups for detailed guide.
Check system:
# System information
uname -a
# Kernel version
uname -r
# Hostname
hostname
# Uptime
uptimeCheck hardware:
# CPU info
lscpu
# Memory info
free -h
# Disk info
df -hSet timezone:
# List timezones
timedatectl list-timezones
# Set timezone
sudo timedatectl set-timezone America/New_YorkSee Time Synchronization for detailed guide.
Set locale:
# Generate locale
sudo locale-gen
# Set locale
sudo localectl set-locale LANG=en_US.UTF-8See Locale and Language for detailed guide.
Change hostname:
# Set hostname
sudo hostnamectl set-hostname new-hostname
# Check hostname
hostnamectlUpdate system:
# Arch/CachyOS
sudo pacman -Syu
# Debian/Ubuntu
sudo apt update && sudo apt upgrade
# Fedora
sudo dnf updateClean packages:
# Clean cache
sudo pacman -Sc
# Remove orphans
sudo pacman -Rns $(pacman -Qdtq)This guide covered system configuration for Arch Linux, CachyOS, and other distributions, including systemd, services, user management, and system maintenance.
- Systemctl Troubleshooting - Service management
- User and Groups - User management
- Time Synchronization - Time setup
- Locale and Language - Locale setup
- ArchWiki systemd: https://wiki.archlinux.org/title/Systemd
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.