Linux Configuration & Installation Suite
From fresh install to fully optimized workstation in minutes β supporting 20+ distributions!
This isn't just another dotfiles script β it's your personal system configuration engineer that transforms any Linux distribution into a hardened, optimized, and privacy-respecting workstation. Whether you're running Arch, Debian, Fedora, or any derivative, this script delivers a perfectly tuned environment.
- π― Universal Linux Support: Auto-detects and supports 20+ distributions across 8 families
- π Intelligent Detection: Auto-detects distro, package manager, init system, and available tools
- β‘ Power Optimization: TLP, auto-cpufreq, and zram for maximum battery life and performance
- π Privacy-First: Mullvad VPN, USBGuard, mat2 metadata stripping, and more
- π Shell Enhancement: One-command Oh My Zsh setup with fzf-tab, auto-suggestions, and fastfetch
- π‘οΈ Safe & Reliable: Comprehensive error handling, automatic backups, and detailed logging
|
Arch Linux & derivatives |
Debian & Ubuntu family |
Fedora & RHEL family |
openSUSE & SUSE family |
|
Gentoo Source-based |
Void Linux Independent |
Alpine Lightweight |
NixOS Declarative |
Full distribution support includes:
- Arch Family: Arch, Manjaro, CachyOS, EndeavourOS, Garuda, Artix
- Debian Family: Debian, Ubuntu, Linux Mint, Pop!_OS, Elementary, Zorin, Deepin
- Fedora Family: Fedora, RHEL, CentOS, Rocky, AlmaLinux, Nobara
- SUSE Family: openSUSE Leap, openSUSE Tumbleweed, SLES
- Others: Gentoo, Funtoo, Void, Alpine, NixOS
# Clone the repository
git clone https://github.com/xi-Rick/sys-admin.git
cd sys-admin
# Make it executable
chmod +x sys-admin.sh
# Run with sudo access
./sys-admin.sh# Enable debug output
./sys-admin.sh --debug
# Show help
./sys-admin.sh --helpWhen you run the script, you'll see a beautiful, distribution-aware interface:
================================================================================
βββββββ ββ ββ βββββββ βββββ ββββββ βββ βββ ββ βββ ββ
ββ ββ ββ ββ ββ ββ ββ ββ ββββ ββββ ββ ββββ ββ
βββββββ ββββ βββββββ βββββββ ββ ββ ββ ββββ ββ ββ ββ ββ ββ
ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ ββ
βββββββ ββ βββββββ ββ ββ ββββββ ββ ββ ββ ββ ββββ
Linux Configuration & Installation Suite
================================================================================
System: arch | Family: arch | Package Manager: pacman
MAIN MENU
Installation & Configuration
1) Essential Tools (TLP, Mullvad, Bluetooth)
2) Privacy & Optimization Tools
System & Information
3) System Update
4) View System Information
5) View Logs
Help
6) About
0) Exit
Select option:
Laptop Power Optimization:
Select option: 1
Select option: 2 (Install & Configure TLP)
Installs TLP with USB blacklist, Bluetooth auto-enable, and optional TLPUI
Privacy-Focused Setup:
Select option: 2
Select option: 3 (usbguard)
Select option: 7 (mat2)
Hardens USB security and adds metadata stripping for files
Shell Environment:
Select option: 1
Select option: 1 (Oh My Zsh Setup)
Full Zsh environment with fzf-tab completions, auto-suggestions, syntax highlighting, and fastfetch
Complete Workstation:
Select option: 3 (System Update)
Select option: 1 (Essential Tools β all)
Select option: 2 (Privacy & Optimization β all)
Everything you need for a secure, optimized Linux workstation
Oh My Zsh + fzf-tab + Fastfetch:
# Shell environment
zsh fzf git fastfetch
# Oh My Zsh with plugins
fzf-tab # Fuzzy tab completions
zsh-autosuggestions # Fish-like auto-suggestions
zsh-syntax-highlighting # Command syntax highlightingTLP Power Management:
# Power optimization
tlp tlp-rdw # Advanced power management + radio device wizard
# Removes conflicting packages
power-profiles-daemon # Automatically removed if present
# Optional GUI
tlpui # Graphical TLP configuration (AUR)Mullvad VPN:
# Headless VPN setup
mullvad-vpn # Installed from official repos
# Auto-configured with:
# β’ Auto-connect on boot
# β’ Daemon auto-start
# β’ Account loginSystem Protection:
nohang # Intelligent OOM prevention (smarter than earlyoom)
usbguard # USB device authorization (BadUSB protection)
mat2 # Metadata sanitizer for files (EXIF, author info)Performance Tuning:
auto-cpufreq # Dynamic CPU governor switching
zram-generator # Compressed swap in RAM (zstd compression)Desktop Enhancement:
kanshi # Dynamic display profiles for Wayland
interception-tools # Kernel-level keyboard remapping (X11 + Wayland)The script provides an interactive USB device selector to prevent TLP from suspending critical devices:
# Automatically detects and lists all USB devices
# Highlights Bluetooth adapters for easy selection
# Updates /etc/tlp.conf with USB_BLACKLIST entries
# Creates timestamped backups before modifying configsEnsures Bluetooth powers on at boot regardless of previous state:
# Modifies /etc/bluetooth/main.conf
# Adds AutoEnable=true under [Policy] section
# Creates backup before modification
# Restarts bluetooth service to applyOptimized swap configuration using RAM compression:
# /etc/systemd/zram-generator.conf.d/swap.conf
[zram0]
zram-size = min(ram / 2, 4096) # Half RAM or 4GB max
compression-algorithm = zstd # Best speed/ratio balance
swap-priority = 100 # Prefer over disk swapThe script enforces correct plugin load order for compatibility:
plugins=(git fzf-tab zsh-autosuggestions zsh-syntax-highlighting)
# 1. compinit β handled by Oh My Zsh
# 2. fzf-tab β must load after compinit, before widget plugins
# 3. autosuggestions β after fzf-tab
# 4. syntax-highlighting β always lastTab β fzf-tab fuzzy completion menu
Ctrl+R β fzf fuzzy history search
Ctrl+T β fzf fuzzy file search
β / End β Accept auto-suggestion
The script automatically gathers system information at startup:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
SYSTEM DETECTION
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
[INFO] Detecting Linux distribution...
[β] Detected: Arch Linux
[β] Family: arch
[β] Package Manager: pacman
[INFO] Kernel: 6.12.8-arch1-1
[INFO] Architecture: x86_64
[INFO] Hostname: workstation
[β] Init system: systemd
Every action is logged with timestamps for audit and troubleshooting:
# Log location
~/.local/state/sys-admin/sys-admin-YYYYMMDD-HHMMSS.txt
# View logs from the menu
Select option: 5 (View Logs)
# Or directly
cat ~/.local/state/sys-admin/sys-admin-*.txtLog entries include severity levels: [INFO], [OK], [WARN], [ERR]
TLP conflicts with power-profiles-daemon:
# The script handles this automatically, but if needed:
sudo systemctl stop power-profiles-daemon
sudo systemctl mask power-profiles-daemon
sudo systemctl enable --now tlp.serviceMullvad daemon not starting:
# Check daemon status
sudo systemctl status mullvad-daemon
# Restart daemon
sudo systemctl restart mullvad-daemon
# Verify connection
mullvad statusOh My Zsh not loading after install:
# Shell change requires logout/login
# Verify default shell
echo $SHELL
# Manually set if needed
chsh -s $(which zsh)zram not activating:
# Load kernel module
sudo modprobe zram
# Check status
zramctl
# Restart systemd unit
sudo systemctl daemon-reload
sudo systemctl start /dev/zram0USBGuard blocking devices:
# List blocked devices
sudo usbguard list-devices --blocked
# Allow a device
sudo usbguard allow-device <id>
# Regenerate policy from current devices
sudo usbguard generate-policy | sudo tee /etc/usbguard/rules.confHelp make Sys Admin even better! Here's how:
git clone https://github.com/xi-Rick/sys-admin.git
cd sys-admin
# Test in a virtual machine
qemu-system-x86_64 -enable-kvm -m 4G linux.qcow2
# Or use containers
docker run -it archlinux:latest /bin/bash
docker run -it ubuntu:latest /bin/bash
docker run -it fedora:latest /bin/bash- Test on Arch-based distributions
- Test on Debian/Ubuntu-based distributions
- Test on Fedora/RHEL-based distributions
- Verify TLP installation and USB blacklist
- Verify Mullvad headless setup
- Verify Oh My Zsh + plugin installation
- Test privacy tools (nohang, usbguard, mat2)
- Test performance tools (auto-cpufreq, zram-generator)
- Verify system update across package managers
- Check logging output
π οΈ Ready to optimize your Linux system? β Star this repo and get started! β
Transform any Linux distribution into a secure, optimized workstation today!
Made with π§ by Dana Davis