# Installation

This guide covers installing the LinuxGuard agent on your Linux systems. You can choose between two installation approaches: a unified installer script that automatically detects your distribution (recommended for quick setup), or distribution-specific repository configuration (recommended for production environments).

> **Note**: Installing in a container? See the [Container Installation Guide](/how-to-guides/how-to/installation/container-installation.md) for container-specific instructions.

## System Requirements

Before installing, ensure your system meets these requirements:

* **Kernel**: Linux kernel 4.18 or later (required for eBPF runtime detection)
* **Architecture**: x86\_64 (AMD64) or aarch64 (ARM64)
* **Network**: Outbound HTTPS access to `api.linuxguard.io` and `packages.linuxguard.io`
* **Permissions**: Root or sudo access for installation

## Option A: Unified Installer (Recommended for Quick Setup)

The unified installer automatically detects your Linux distribution and configures the appropriate package repository:

```bash
curl -fsSL https://packages.linuxguard.io/install-linuxguard.sh | sudo bash
```

The installer will:

* Detect your Linux distribution (Debian/Ubuntu, RedHat/CentOS, openSUSE/SLES, or Alpine)
* Configure the appropriate package repository (APT, DNF/YUM, Zypper, or APK)
* Install the LinuxGuard agent package and the `sysstat` dependency (provides `iostat`/`mpstat` for system metrics collection)

### Installer Options

The installer supports the following options:

| Option           | Description                                                                                  |
| ---------------- | -------------------------------------------------------------------------------------------- |
| `--yes` or `-y`  | Non-interactive mode for automated deployments (CI/CD, configuration management).            |
| `--fix-repo`     | Repair existing repository configuration. Use if repository configuration becomes corrupted. |
| `--help` or `-h` | Display help message.                                                                        |

### Installation Examples

**Basic installation (interactive):**

```bash
curl -fsSL https://packages.linuxguard.io/install-linuxguard.sh | sudo bash
```

**Non-interactive installation for automation:**

```bash
curl -fsSL https://packages.linuxguard.io/install-linuxguard.sh | sudo bash -s -- --yes
```

## Option B: Distribution-Specific Installation

For production environments where you want explicit control over repository configuration, follow the guide for your distribution:

| Distribution                    | Guide                                                                                  |
| ------------------------------- | -------------------------------------------------------------------------------------- |
| Debian, Ubuntu, Linux Mint      | [Installation on Debian / Ubuntu](/how-to-guides/how-to/installation/debian-ubuntu.md) |
| RedHat Enterprise Linux, CentOS | [Installation on RedHat / CentOS](/how-to-guides/how-to/installation/redhat-centos.md) |
| SUSE Linux Enterprise, openSUSE | [Installation on SUSE / openSUSE](/how-to-guides/how-to/installation/suse.md)          |
| Alpine Linux                    | [Installation on Alpine Linux](/how-to-guides/how-to/installation/alpine.md)           |

Each guide provides step-by-step instructions for:

* Manual repository configuration with GPG key verification
* Distribution-specific package manager commands
* Direct package download as an alternative
* Distribution-specific troubleshooting tips

## Verification

After installation, the LinuxGuard agent service should be installed but not yet running (it needs to be configured first). You can verify the installation by checking if the agent binary exists:

```bash
which linuxguard-agent
```

You can also verify that the agent user was created:

```bash
id linuxguard
```

## Security

The LinuxGuard agent is installed with security as a top priority. The installer creates a dedicated `linuxguard` user account, and the agent runs without root privileges with read-only access to system components. For detailed information about our security architecture, see the [Security Architecture](/explanation/explanation/security.md) page.

## Uninstallation

If you need to remove the LinuxGuard agent, we provide a complete cleanup process that removes all agent files, configuration, and user accounts. See the [Uninstallation Guide](/how-to-guides/how-to/uninstallation.md) for instructions.

***

**Next Step**: [Configuration →](/how-to-guides/how-to/configuration.md)

**Related**: [Prerequisites](/how-to-guides/how-to/prerequisites.md) | [Debian/Ubuntu Installation](/how-to-guides/how-to/installation/debian-ubuntu.md) | [RedHat/CentOS Installation](/how-to-guides/how-to/installation/redhat-centos.md) | [SUSE Installation](/how-to-guides/how-to/installation/suse.md) | [Alpine Installation](/how-to-guides/how-to/installation/alpine.md) | [Automated Deployment](/how-to-guides/how-to/automated-deployment.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.linuxguard.io/how-to-guides/how-to/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
