> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cybedefend.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Linux Setup for Local Code Scanning

> Install the CybeDefend CLI on various Linux distributions for local or CI-based security scans.

CybeDefend’s CLI offers support for a wide range of Linux distributions. Install the CLI, provide your API key, and scan code right from your terminal or Docker-based environments.

## Requirements

* **Linux** (32-bit or 64-bit).
* [Personal Access Token (PAT)](/latest/code-scanning/local-code-scanning/introduction-api-key) from your CybeDefend account.
* Basic terminal knowledge.

***

## Installation Steps

1. **Download the Binary**\
   From [Releases](https://github.com/CybeDefend/cybedefend-cli/releases), pick `cybedefend-linux-amd64` (64-bit) or `cybedefend-linux-386` (32-bit).
2. **Make Executable**
   ```bash theme={null}
   chmod +x cybedefend-linux-amd64
   ```
3. **Move to PATH**
   ```bash theme={null}
   sudo mv cybedefend-linux-amd64 /usr/local/bin/cybedefend
   ```
4. **Test**
   ```bash theme={null}
   cybedefend version
   ```

<Note>
  If you’re running Alpine or a musl-based distro, ensure compatibility or build from source using <strong>go build</strong>.
</Note>

***

## Scanning Your Project

1. **Authenticate (one-time setup)**
   ```bash theme={null}
   cybedefend login --pat YOUR_PAT --region eu
   ```
2. **In Terminal**
   ```bash theme={null}
   cd ~/my-app
   cybedefend scan --dir . --project-id YOUR_PROJECT_ID
   ```
3. **Check Results**
   ```bash theme={null}
   cybedefend results --project-id YOUR_PROJECT_ID --all --output json
   ```

<Accordion icon="info" title="Integration with Docker">
  <p>If you run scans inside Docker, mount your source directory as a volume and pass your PAT via the <strong>CYBEDEFEND\_PAT</strong> environment variable.</p>
</Accordion>

<Tip>
  This process easily integrates into <strong>Jenkins</strong>, <strong>GitLab CI</strong>, or <strong>GitHub Actions</strong> running on Linux hosts.
</Tip>
