System Administration

Core system administration: systemd, users, packages, and logging.

Topics

Topic Description

systemd

Service management, units, targets, timers

Users & Permissions

User management, groups, sudo, ACLs

Package Management

pacman, dnf, apt - installation, updates, cleanup

Logging

journald, rsyslog, log rotation, centralized logging

Key Concepts

systemd

systemd is the init system and service manager for modern Linux:

  • Units — configuration files describing services, mounts, timers

  • Targets — groups of units (like runlevels)

  • Journal — centralized logging via journald

Package Management

Each distribution family has its package manager:

  • Arch

  • RHEL

  • Debian

pacman -Syu              # Update system
pacman -S <package>      # Install
pacman -Rs <package>     # Remove with deps
pacman -Ss <query>       # Search
dnf upgrade              # Update system
dnf install <package>    # Install
dnf remove <package>     # Remove
dnf search <query>       # Search
apt update && apt upgrade  # Update system
apt install <package>      # Install
apt remove <package>       # Remove
apt search <query>         # Search

Quick Reference

Service Management

systemctl status <service>         # Check status
systemctl start <service>          # Start
systemctl stop <service>           # Stop
systemctl restart <service>        # Restart
systemctl enable <service>         # Enable at boot
systemctl enable --now <service>   # Enable and start

User Management

useradd -m -G wheel <user>    # Create user with sudo
passwd <user>                  # Set password
usermod -aG <group> <user>    # Add to group
id <user>                      # Show user info