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

# Install the Efference SDK on Linux

> Install the Efference SDK and tools on an x86_64 Linux PC

Use the automated installer on Ubuntu or another apt-based Linux host.

## Before you begin

* Ubuntu 22.04 or 24.04 is recommended
* Connect the M1 with a USB-C data cable, preferably to a direct USB 3.x port
* Your user must be able to run `sudo` for the first-time `--deps` install,
  which adds apt packages and the USB udev rule

See [Recommended Specifications](/get-started/requirements) for compatible
hosts and device requirements.

## Install

<Steps>
  <Step title="Clone the public repository">
    ```sh theme={null}
    git clone https://github.com/EfferenceAI/efference.git
    cd efference
    ```
  </Step>

  <Step title="Build the Linux SDK">
    ```sh theme={null}
    ./build.sh --deps
    ```

    `--deps` installs packages and the M1 USB udev rule, then builds the SDK
    and tools. This first run uses `sudo`.
  </Step>

  <Step title="Re-plug the M1">
    The installer creates `/etc/udev/rules.d/51-efference.rules`. Disconnect
    and reconnect the device after the first installation so the new
    permissions take effect.
  </Step>

  <Step title="Verify the installation">
    ```sh theme={null}
    ./sdk/linux/build/ef-cli list
    ./sdk/linux/build/ef-cli info
    ```

    `ef-cli list` should discover the connected M1. `ef-cli info` prints its
    serial, firmware version, capture modes, camera configuration, IMU
    parameters, and wireless status.
  </Step>
</Steps>

The binaries are written to `sdk/linux/build/`:

| Tool               | Purpose                                                               |
| ------------------ | --------------------------------------------------------------------- |
| `ef-cli`           | Device discovery, configuration, health, recording, WiFi, and updates |
| `efference-viewer` | Decoded live video with IMU status                                    |
| `ef-decrypt`       | Turns an encrypted recording back into a plain MCAP                   |

`efference-viewer` and `ef-decrypt` are built only when their optional
dependencies are present, and the configure output says which were found. The
viewer needs OpenCV and FFmpeg, `ef-decrypt` needs libssl-dev; `--deps` installs
both sets.

<Note>
  After installation, run `./build.sh` to rebuild without changing packages or
  USB permissions. To install only the udev rule, run
  `sdk/linux/build.sh --udev`.
</Note>

## Put the tools on your PATH

Invoking the tools by their full path always works. For regular use, choose one
of the following:

```sh theme={null}
source env.sh                    # add ef-cli to PATH for this shell
sdk/linux/build.sh --install     # install for every shell (needs sudo)
```

`--install` copies `ef-cli` and `ef-decrypt` onto your PATH and installs the
library, its headers, and the calibration shared objects, so `find_package(ef)`
resolves in your own CMake project. Because it copies rather than links, re-run
it after every rebuild. `efference-viewer` is not installed; run it from
`sdk/linux/build/`.

`source env.sh` puts the build directory itself on PATH, so it is current the
moment a build finishes, and it also sets `CMAKE_PREFIX_PATH` so the tutorials
resolve `find_package(ef)`. It works from any directory if you give its full
path, and adding that line to `~/.bashrc` makes it apply to every new shell.

## Next step

Continue with [Connection & Lifecycle](/device/connection), or set up
[wireless operation](/get-started/quickstart-wireless).
