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

# Building on Linux

> Complete guide to building and running Dolphin Emulator on Linux

## System Requirements

<Note>
  Most modern Linux distributions are supported. Unix-like systems other than Linux are not officially supported but might work.
</Note>

### Hardware Requirements

* **Processor**: CPU with SSE2 support (modern 3 GHz Dual Core recommended, not older than 2008)
* **Graphics**: Graphics card supporting OpenGL 3.3 (OpenGL 4.4 recommended)

## Build Requirements

### Required Tools

* **CMake** - Build system generator
* **GCC or Clang** - Recent version with decent C++20 support
* **Git** - Version control

<Note>
  CMake will inform you if your compiler is too old or if you need to install any missing packages.
</Note>

### Installing Dependencies

Many libraries are bundled with Dolphin and used if they're not installed on your system. For distribution-specific dependency installation instructions, refer to the [Building for Linux wiki](https://github.com/dolphin-emu/dolphin/wiki/Building-for-Linux).

## Building Dolphin

### Clone the Repository

First, clone the Dolphin repository and initialize submodules:

```bash theme={null}
git clone https://github.com/dolphin-emu/dolphin.git
cd dolphin
git submodule update --init --recursive
```

<Warning>
  Make sure to pull submodules before building. Building without submodules will fail.
</Warning>

### Build Methods

Dolphin supports three different build configurations for Linux:

<Tabs>
  <Tab title="Global Installation">
    Install Dolphin to your system (requires root access).

    <Steps>
      <Step title="Create build directory">
        ```bash theme={null}
        mkdir build
        cd build
        ```
      </Step>

      <Step title="Configure with CMake">
        ```bash theme={null}
        cmake ..
        ```

        CMake will check dependencies and inform you of any missing packages.
      </Step>

      <Step title="Compile">
        ```bash theme={null}
        make -j $(nproc)
        ```

        This uses all available CPU cores for faster compilation.
      </Step>

      <Step title="Install to system">
        ```bash theme={null}
        sudo make install
        ```

        <Note>
          This installs Dolphin system-wide and makes it available from your application menu.
        </Note>
      </Step>
    </Steps>
  </Tab>

  <Tab title="Local Development">
    Build for development without requiring root access.

    <Steps>
      <Step title="Create build directory">
        ```bash theme={null}
        mkdir Build
        cd Build
        ```
      </Step>

      <Step title="Configure for local development">
        ```bash theme={null}
        cmake .. -DLINUX_LOCAL_DEV=true
        ```

        The `LINUX_LOCAL_DEV` flag enables local development mode.
      </Step>

      <Step title="Compile">
        ```bash theme={null}
        make -j $(nproc)
        ```
      </Step>

      <Step title="Link system data">
        ```bash theme={null}
        ln -s ../../Data/Sys Binaries/
        ```

        This creates a symbolic link to the system data directory.
      </Step>
    </Steps>

    <Note>
      Useful for development as root access is not required.
    </Note>
  </Tab>

  <Tab title="Portable Build">
    Create a portable installation that can be moved between systems.

    <Steps>
      <Step title="Create build directory">
        ```bash theme={null}
        mkdir Build
        cd Build
        ```
      </Step>

      <Step title="Configure for local development">
        ```bash theme={null}
        cmake .. -DLINUX_LOCAL_DEV=true
        ```
      </Step>

      <Step title="Compile">
        ```bash theme={null}
        make -j $(nproc)
        ```
      </Step>

      <Step title="Copy system data">
        ```bash theme={null}
        cp -r ../Data/Sys/ Binaries/
        ```

        This copies (not links) the system data directory.
      </Step>

      <Step title="Create portable marker">
        ```bash theme={null}
        touch Binaries/portable.txt
        ```

        The presence of `portable.txt` tells Dolphin to use portable mode.
      </Step>
    </Steps>

    <Note>
      Portable builds can be stored on external storage and used on different Linux systems.
      Also useful for having multiple distinct Dolphin setups for testing/development/TAS.
    </Note>
  </Tab>
</Tabs>

## Running Dolphin

<Tabs>
  <Tab title="Global Installation">
    After system installation, launch Dolphin from:

    * Application menu
    * Command line: `dolphin-emu`
  </Tab>

  <Tab title="Local/Portable Build">
    Run from the build directory:

    ```bash theme={null}
    cd Build/Binaries
    ./dolphin-emu
    ```
  </Tab>
</Tabs>

## Command Line Usage

Dolphin supports various command-line options:

<CodeGroup>
  ```bash Basic Usage theme={null}
  # Launch a game directly
  dolphin-emu -e "path/to/game.iso"

  # Run in batch mode (no UI)
  dolphin-emu -b -e "game.iso"
  ```

  ```bash Advanced Options theme={null}
  # Set configuration option
  dolphin-emu -C System.Section.Key=Value

  # Specify video backend
  dolphin-emu -v Vulkan -e "game.iso"

  # Set audio emulation
  dolphin-emu -a LLE -e "game.iso"
  ```

  ```bash Debugging theme={null}
  # Enable debugger and logger
  dolphin-emu -d -l -e "game.iso"
  ```
</CodeGroup>

### Available Video Backends

* **OGL** - OpenGL
* **Vulkan** - Vulkan API
* **Null** - No rendering
* **Software Renderer** - CPU rendering (debugging only)

## Uninstalling

<Tabs>
  <Tab title="Global Installation">
    Run the following command as root from the build directory:

    ```bash theme={null}
    cat install_manifest.txt | xargs -d '\n' rm
    ```

    Or with sudo:

    ```bash theme={null}
    sudo sh -c "cat install_manifest.txt | xargs -d '\n' rm"
    ```
  </Tab>

  <Tab title="Local/Portable Build">
    Simply delete the build directory:

    ```bash theme={null}
    rm -rf Build
    ```
  </Tab>
</Tabs>

<Note>
  To completely remove Dolphin, also delete the global user directory (`~/.dolphin-emu` or `~/.local/share/dolphin-emu`) if you don't plan on reinstalling.
</Note>

## Troubleshooting

<AccordionGroup>
  <Accordion title="CMake reports compiler too old">
    Install a recent version of GCC or Clang with C++20 support:

    ```bash theme={null}
    # Ubuntu/Debian
    sudo apt install build-essential gcc g++

    # Fedora
    sudo dnf install gcc gcc-c++

    # Arch Linux
    sudo pacman -S base-devel
    ```
  </Accordion>

  <Accordion title="Missing dependencies">
    CMake will inform you of missing packages. Install them using your distribution's package manager.

    For detailed dependency lists, see the [Building for Linux wiki](https://github.com/dolphin-emu/dolphin/wiki/Building-for-Linux).
  </Accordion>

  <Accordion title="Build fails with submodule errors">
    Ensure you've initialized and updated all submodules:

    ```bash theme={null}
    git submodule update --init --recursive
    ```
  </Accordion>

  <Accordion title="Graphics driver issues">
    Ensure you have up-to-date graphics drivers:

    * **NVIDIA**: Install proprietary drivers
    * **AMD**: Use AMDGPU drivers (usually included in modern kernels)
    * **Intel**: Mesa drivers (usually pre-installed)
  </Accordion>
</AccordionGroup>

## DolphinTool Usage

Dolphin includes a command-line tool for disc image operations:

```bash theme={null}
dolphin-tool COMMAND -h
```

### Available Commands

<Tabs>
  <Tab title="convert">
    Convert disc images between formats:

    ```bash theme={null}
    dolphin-tool convert -i input.iso -o output.rvz -f rvz \
      -c zstd -l 5 -b 131072
    ```

    Supported formats: ISO, GCZ, WIA, RVZ
  </Tab>

  <Tab title="verify">
    Verify disc image integrity:

    ```bash theme={null}
    dolphin-tool verify -i game.iso -a md5
    ```

    Supported algorithms: crc32, md5, sha1, rchash
  </Tab>

  <Tab title="header">
    Display disc image header information:

    ```bash theme={null}
    dolphin-tool header -i game.rvz -c -l
    ```
  </Tab>

  <Tab title="extract">
    Extract files from disc images:

    ```bash theme={null}
    dolphin-tool extract -i game.iso -o output_folder
    ```
  </Tab>
</Tabs>
