Environment:ARCANGEL0 EVA Linux Host
| Knowledge Sources | |
|---|---|
| Domains | Infrastructure, Security |
| Last Updated | 2026-10-29 12:00 GMT |
Overview
Linux OS environment with a supported native package manager (apt-get, pacman, dnf, zypper, apk, or yum) for host detection, Docker installation, and armory tool management.
Description
This environment defines the Linux host context required by Mitsu's system-level features. It detects the OS distribution from `/etc/os-release` and selects a native package manager from a supported set: apt-get (Debian, Ubuntu, Kali, Mint, Pop), pacman (Arch, BlackArch, Garuda, Manjaro), dnf (Fedora, RHEL, CentOS, Rocky, AlmaLinux), zypper (openSUSE, SLES), apk (Alpine), and yum. The detected package manager is persisted to `~/.config/mitsu/host.json` with 0o600 permissions. Docker installation and the Red Team Armory install pipeline both require this Linux host context.
Usage
Use this environment for any implementation that interacts with the host OS: Docker Engine installation, SearXNG container setup, armory tool inspection and installation, and host environment detection. Automatic Docker installation is Linux only — `install_docker_engine` raises `DockerInstallError` on non-Linux platforms.
System Requirements
| Category | Requirement | Notes |
|---|---|---|
| OS | Linux | `/etc/os-release` must be present |
| Package Manager | apt-get, pacman, dnf, zypper, apk, or yum | At least one must be on PATH |
| Privileges | sudo or root | Required for system package operations |
Dependencies
System Packages
- One of: `apt-get`, `pacman`, `dnf`, `zypper`, `apk`, `yum`
- `sudo` (for non-root users)
- `systemctl` or `service` (for service management)
Python Packages
None beyond the base Python environment.
Credentials
No environment variables are required for host detection. The sudo password is requested interactively when elevated privileges are needed.
Quick Install
# Verify a supported package manager is available
which apt-get || which pacman || which dnf || which zypper || which apk || which yum
Code Evidence
Linux-only check from `services/docker_installer.py:59-60`:
if not sys.platform.startswith("linux"):
raise DockerInstallError("Automatic Docker installation is available on Linux only.")
Distro-to-package-manager mapping from `services/host_environment.py:53-73`:
distro_preferences = {
"arch": "pacman",
"blackarch": "pacman",
"debian": "apt-get",
"kali": "apt-get",
"ubuntu": "apt-get",
"fedora": "dnf",
"opensuse": "zypper",
"alpine": "apk",
}
OS release parsing from `services/host_environment.py:41-48`:
lines = Path("/etc/os-release").read_text(encoding="utf-8").splitlines()
for line in lines:
key, separator, value = line.partition("=")
if separator and key in {"ID", "PRETTY_NAME"}:
values[key] = value.strip().strip('"').strip("'")
Common Errors
| Error Message | Cause | Solution |
|---|---|---|
| `No supported package manager was found` | None of apt-get, pacman, dnf, zypper, apk, yum on PATH | Install one of the supported package managers |
| `sudo was not found` | Non-root user without sudo | Install sudo or run as root |
| `Automatic Docker installation is available on Linux only` | Running on macOS or Windows | Use WSL2 or a Linux VM |
| `No supported service manager was found` | Neither systemctl nor service available | Install systemd or sysvinit |
Compatibility Notes
- macOS / Windows: Not supported for Docker installation or native package management.
- WSL2: Should work since WSL2 provides a Linux kernel and `/etc/os-release`.
- Distro detection: Falls back to `"unknown"` if `/etc/os-release` is missing or unreadable.
- Docker group: Non-root users are added to the `docker` group during Docker installation; a new login session or `sg docker -c` is needed to use it without restarting.