| name | manjaro |
| description | Manjaro/Arch Linux package and system administration skill. Activate this skill whenever the user asks to install, update, remove, or manage software — especially Python packages, pip, uv, venv, virtualenv, requirements.txt, Poetry, npm, cargo, go, CLI tools, system packages, services, drivers, kernels, or configuration. Trigger on any install request (e.g. "install", "pip install", "uv add", "npm install", "package not found", "externally-managed environment"), pacman, yay, pamac, PKGBUILD, makepkg, systemctl, journalctl, mhwd, mkinitcpio, grub, manjaro-chroot, arch-chroot, timeshift, btrfs snapshots, pacman.conf, mirrorlist, or any Linux system administration task. Once activated, verify the host distribution; if it is Manjaro or Arch Linux, enforce pacman/AUR-first package resolution and uv-based Python virtual environments when isolation is required. |
Manjaro Linux System Administration
Manjaro is a rolling-release distribution based on Arch Linux. It uses pacman for package
management, systemd for services, and adds its own tools for hardware detection (mhwd)
and kernel management. This skill ensures you always prefer native Manjaro tools over
generic cross-platform alternatives.
Platform check: This skill was activated because the request involves installing or
managing software. Before applying any command, verify the host distribution:
cat /etc/os-release
uname -a
- If the output contains
Manjaro, Arch, or EndeavourOS (Arch-based), apply this skill.
- If the output is another distribution (Ubuntu, Debian, Fedora, etc.), stop using this
skill and switch to the appropriate platform guidance, or ask the user for confirmation.
- If you cannot determine the distribution, ask the user: "Are you on Manjaro/Arch Linux?"
The default system-wide package manager on Manjaro/Arch is pacman (GUI:
pamac-installer), not pip, npm -g, or cargo install.
⚠️ Safety Principle: User Control
This skill helps the AI suggest correct Manjaro commands. You retain full control.
Permission Configuration (Recommended)
Add this to your OpenCode config (~/.config/opencode/opencode.json) to require approval for system changes:
{
"permission": {
"bash": {
"*": "ask",
"pacman -Ss *": "allow",
"yay -Ss *": "allow",
"systemctl status *": "allow",
"journalctl *": "allow",
"git *": "allow"
}
}
}
This ensures:
sudo pacman -S ..., yay -S ... → requires approval ("ask")
- Search queries (
pacman -Ss, yay -Ss) → auto-allow
- Status checks, logs, git → auto-allow
General Safety Guidelines
When suggesting commands that modify the system:
- Always explain what the command will do before running it
- Warn about consequences (e.g., "This will remove package X and its dependencies")
- Create snapshots before risky operations (see Timeshift section)
- Prefer reversible operations when possible
GUI Package Installer (pamac-installer)
Use Manjaro's native GUI package installer for package installation:
pamac-installer <package>
⚠️ WARNING: This will launch the Pamac GUI to install "" from Manjaro repositories.
Check for pamac-installer:
which pamac-installer
Always explain before running pamac-installer:
- State clearly: "I will launch the Pamac package manager to install "
- Show: "Command: pamac-installer "
- Explain: "This opens a graphical window where you can review and confirm the installation"
- Wait for user confirmation before executing
For AUR packages, use:
pamac-installer <package> --build
Core Principle: Pacman First
On a Manjaro system, always prefer native package management over language-specific
installers. This avoids version conflicts, ensures system-wide updates catch everything,
and keeps the system clean.
Package Resolution Decision Tree
When the user needs to install software, follow this order:
1. Is it available via pacman?
$ pacman -Ss <name>
YES -> ⚠️ WARNING: This will install "<package>" from Manjaro repositories.
Launch Pamac GUI:
pamac-installer <package>
NO -> go to step 2
2. Is it available in the AUR?
$ yay -Ss <name>
YES -> ⚠️ WARNING: This will install "<package>" from AUR.
Launch Pamac GUI with AUR support:
pamac-installer <package> --build
NO -> go to step 3
3. Use language-specific installer IN ISOLATION ONLY:
- Python: prefer `uv` (install `uv` itself from pacman/AUR first)
`uv venv && uv pip install <pkg>`
(NEVER `sudo pip install`; NEVER plain `pip install` in a managed environment)
- npm: npm install <pkg> (local node_modules, NEVER npm -g)
- cargo: cargo install <pkg> (goes to ~/.cargo/bin)
- go: go install <pkg>@latest (goes to ~/go/bin)
NEVER: sudo pip install, sudo npm install -g, or any global language-specific install.
Global CLI tools MUST come from pacman or AUR.
⚠️ Before any installation, ALWAYS:
- Explain what will be installed
- Show the exact command
- Warn that a GUI window will open for confirmation
- Wait for explicit user confirmation
Common Equivalence: Generic -> Manjaro
| Instead of... | Use... |
|---|
brew install htop | pamac-installer htop |
snap install code | pamac-installer visual-studio-code-bin --build |
curl -fsSL ... | sh | Check pacman -Ss / yay -Ss first |
npm -g install neovim | pamac-installer neovim |
cargo install fd | pamac-installer fd |
pip install httpie | pamac-installer python-httpie |
pip install <pkg> | pamac-installer python-<pkg> or uv venv && uv pip install <pkg> |
For the full equivalence table and command reference, read references/packages.md.
Python Packaging on Manjaro
On Manjaro, Python packages belong to the system package manager unless there is a
specific reason to isolate them. This prevents the "externally-managed environment"
errors from pip, keeps system updates coherent, and lets the rolling release handle
security fixes.
Python Package Resolution Order
1. Need a Python library/CLI tool?
Search pacman first:
$ pacman -Ss python-<name>
YES -> Install with GUI:
pamac-installer python-<name>
NO -> go to step 2
2. Not in repos?
Search the AUR:
$ yay -Ss python-<name>
YES -> Build/install with GUI:
pamac-installer python-<name> --build
NO -> go to step 3
3. Only NOW use an isolated Python environment:
- Make sure `uv` is installed system-wide:
pamac-installer uv
- Create a project venv and install the package inside it:
uv venv .venv
uv pip install <pkg>
- For a project, prefer:
uv add <pkg>
uv run <your-script>
Hard Rules
| Never do this | Why | Do this instead |
|---|
sudo pip install <pkg> | Breaks system Python, conflicts with pacman | pamac-installer python-<pkg> |
pip install <pkg> outside a venv | Triggers "externally-managed environment" error or pollutes /usr | uv venv .venv && uv pip install <pkg> |
python -m venv .venv && source .venv/bin/activate && pip install <pkg> | Works but slower and less ergonomic than uv | uv venv && uv pip install <pkg> or uv add <pkg> |
Install uv with curl | sh | Bypasses the system package manager | pamac-installer uv or pamac-installer uv --build |
Installing uv (system-wide)
uv is a CLI tool and must come from pacman/AUR like any other global binary:
pacman -Ss uv
pamac-installer uv
pamac-installer uv --build
Creating a Project Venv with uv
uv venv .venv
uv pip install requests
uv init --bare
uv add requests
uv run python myscript.py
Essential Python Packages Already in Repos
Many commonly needed packages are packaged as python-<name>:
| Need | Manjaro package |
|---|
requests | python-requests |
numpy | python-numpy |
pandas | python-pandas |
pytest | python-pytest |
pydantic | python-pydantic |
flask | python-flask |
django | python-django |
beautifulsoup4 | python-beautifulsoup4 |
lxml | python-lxml |
pillow | python-pillow |
virtualenv | python-virtualenv |
Always search pacman -Ss python-<name> before assuming a package is missing.
When to Use a Venv
Use an isolated environment (with uv) when:
- The package is not in pacman/AUR.
- You need a specific version that conflicts with the system package.
- You are developing a project with its own dependency tree.
- You are running third-party code that bundles many Python deps.
For everything else, install python-<pkg> system-wide via pamac-installer.
Package Management Quick Reference
/usr/bin/pamac-installer <pkg>
sudo pacman -S <pkg>
sudo pacman -S --needed <pkg>
sudo pacman -Rns <pkg>
pacman -Ss <query>
pacman -Qs <query>
pacman -Qi <pkg>
pacman -Qo /path/to/file
sudo pacman -Syu
sudo pacman -Syyu
yay -S <pkg>
yay -Ss <query>
yay -Sua
yay -Syu
Critical rule: Never run pacman -Sy <package> — this causes partial upgrades and
breaks shared library dependencies. Always use -Syu.
systemd Services
sudo systemctl start/stop/restart <unit>
sudo systemctl enable --now <unit>
sudo systemctl disable <unit>
systemctl status <unit>
systemctl --failed
journalctl -u <unit> -f
journalctl -p err -b
For unit file templates (daemon, oneshot, timer, user service, Docker container, socket
activation), hardening directives, and timer syntax, read references/systemd-recipes.md.
Docker
Docker is the container runtime on this system. Do NOT suggest Podman.
Setup
sudo pacman -S docker docker-compose
sudo systemctl enable --now docker
sudo usermod -aG docker $USER
Common Operations
docker ps
docker compose up -d
docker compose down
docker compose logs -f <service>
docker system prune -a
docker volume ls
Docker as systemd Service
To run a container as a system service, create a unit file:
[Unit]
Description=My Docker Container
After=docker.service
Requires=docker.service
[Service]
Type=simple
Restart=always
RestartSec=10
ExecStartPre=-/usr/bin/docker stop %n
ExecStartPre=-/usr/bin/docker rm %n
ExecStart=/usr/bin/docker run --name %n \
-p 8080:8080 \
-v /opt/data:/data \
--rm \
my-image:latest
ExecStop=/usr/bin/docker stop %n
[Install]
WantedBy=multi-user.target
Timeshift & Btrfs Snapshots
This system uses Timeshift on Btrfs for snapshots.
Create Snapshots
sudo timeshift --create --comments "before update"
sudo timeshift --list
sudo timeshift --restore
Btrfs Direct Operations
sudo btrfs subvolume list /
sudo btrfs subvolume snapshot / /mnt/@snap-$(date +%F)
sudo btrfs scrub start /
sudo btrfs filesystem usage /
When to Snapshot
Always create a snapshot before:
- System updates (
pacman -Syu)
- Kernel changes (
mhwd-kernel -i/-r)
- GPU driver changes (
mhwd -i/-r)
- Major configuration changes (GRUB, mkinitcpio, fstab)
System Configuration
pacman.conf (/etc/pacman.conf)
Key settings to know:
[options]
ParallelDownloads = 5
Color
CheckSpace
IgnorePkg = <pkg1> <pkg2>
Enable [multilib] for 32-bit support (Steam, Wine).
Mirror Management
sudo pacman-mirrors --fasttrack 5
sudo pacman-mirrors --geoip
sudo pacman -Syyu
Kernel Management (Manjaro-specific)
mhwd-kernel -li
mhwd-kernel -l
sudo mhwd-kernel -i linux610
sudo mhwd-kernel -r linux66
Always keep at least two kernels installed as fallback.
Hardware Detection (mhwd)
mhwd -li
mhwd -l
sudo mhwd -a pci nonfree 0300
System Maintenance
Regular Maintenance Checklist
sudo timeshift --create --comments "pre-update"
sudo pacman -Syu
yay -Sua
sudo pacman -Rns $(pacman -Qtdq) 2>/dev/null
paccache -r
systemctl --failed
journalctl --disk-usage
sudo journalctl --vacuum-size=500M
sudo pacdiff
Health Check Commands
uname -r
df -h / /home /boot
free -h
systemctl --failed
pacman -Qtdq | wc -l
journalctl --disk-usage
checkupdates | wc -l
Pre-Destructive Operation Checklist
Before any operation that could break the system, run through this:
[ ] Timeshift snapshot created?
sudo timeshift --create --comments "before <operation>"
[ ] At least 2 kernels installed?
mhwd-kernel -li
[ ] Current state is bootable?
Test with: systemctl is-system-running
[ ] Network available for recovery packages?
ping -c 1 archlinux.org
[ ] Know how to chroot from live USB?
Boot live USB -> sudo manjaro-chroot -a
Operations that require this checklist:
pacman -Syu (major updates with kernel/driver changes)
mhwd-kernel -i/-r (kernel install/remove)
mhwd -i/-r (GPU driver changes)
grub-mkconfig, mkinitcpio -P
- Editing
/etc/fstab, /etc/mkinitcpio.conf, /etc/default/grub
Troubleshooting Quick Reference
For full diagnosis-to-fix flows covering 12 common scenarios (broken updates, GPU issues,
lock files, filesystem corruption, boot failures, dependency conflicts, keyring problems,
sound/network issues, permissions, disk space, clock), read references/troubleshooting.md.
Emergency Recovery (from live USB)
sudo manjaro-chroot -a
pacman -Syu
mkinitcpio -P
grub-mkconfig -o /boot/grub/grub.cfg
exit
reboot
Reference Files
Read these on-demand when you need detailed information:
references/packages.md — Full pacman/yay command reference, advanced queries,
cache management, makepkg config, package groups, downgrading, useful one-liners,
complete generic-to-manjaro equivalence tables.
references/systemd-recipes.md — Unit file templates for every service type,
timer syntax and examples, journal management, boot analysis, security hardening,
drop-in overrides, dependency ordering.
references/troubleshooting.md — 12 common issues with structured
symptoms/diagnosis/fix flows: broken updates, GPU, lock files, filesystem corruption,
boot failures, dependency conflicts, keyring, sound, network, permissions, disk space,
clock issues.