> For the complete documentation index, see [llms.txt](https://docs.thousandeyes.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thousandeyes.com/product-documentation/connected-devices/device-agents/getting-started/embedded-linux-quick-install.md).

# Embedded Linux Quick Install

Use this quick install to validate the Device Agent's performance on a Linux device before you prepare a production image.

## Before You Start

1. Request the agent package, your authentication **secret**, and **client** string from your ThousandEyes contact.
2. Prepare the target device for connection to your computer. For example, use two Ethernet cables for separate LAN and WAN connections. Have an Ethernet adapter if your computer does not have an Ethernet port.
3. Ensure that the internet connection supports the target device's maximum WAN speed and has working DNS and outbound HTTPS.

<details>

<summary>Verifying the Signed Archive (Optional)</summary>

Run these commands in a terminal on the computer where you downloaded the package.

Keep the downloaded package compressed until its signature has been verified. Verification checks the exact bytes of the `.tar.gz` file.

On the computer where you downloaded the package, create a folder containing only the Agent package and its signature. Open a terminal and change to that folder. You can type `cd` , drag the folder into Terminal, and press Return.

For example:

```bash
cd /Users/<your-username>/Downloads/myagentpackage
```

Replace `MY_AGENT_PACKAGE.tar.gz` in the commands below with the complete filename of your downloaded package.

Confirm that the package is still gzip-compressed:

```bash
file MY_AGENT_PACKAGE.tar.gz
```

The output must include:

```
gzip compressed data
```

{% hint style="warning" %}
The package filename must end in `.tar.gz`. Its signature must end in `.tar.gz.signature`.

If the package ends in `.tar`, the browser may have decompressed it. Do not rename or recompress it because the signature will not match. Disable browser settings that automatically open downloaded files, then download the original package again.
{% endhint %}

Download the Cisco Root CA certificate:

```bash
curl -fLO https://www.cisco.com/security/pki/certs/csirca4096.pem
```

Verify the package. Replace both example filenames with the complete filenames you downloaded:

```bash
openssl cms -verify -binary \
  -CAfile csirca4096.pem \
  -in MY_AGENT_PACKAGE.tar.gz.signature \
  -inform DER \
  -content MY_AGENT_PACKAGE.tar.gz \
  -out /dev/null
```

Continue only when the command reports:

```
Verification successful
```

</details>

## 1. Extract the Archive

Complete this step on the computer where you downloaded the package.

1. Extract the full agent package. Replace the example filename with the complete filename you downloaded:

   ```bash
   tar -xzf MY_AGENT_PACKAGE.tar.gz
   ```
2. Then extract the Agent Updater archive:

   ```bash
   tar -xzf cdev_agent_updater-*.tar.gz
   ```
3. Confirm that the extracted directory contains the Updater and configuration templates:
   * **Updater:** `opt/thousandeyes/cdev/router_agent_updater/bin/router_agent_updater`
   * **Configuration templates:** `opt/thousandeyes/cdev/router_agent_updater/etc/...`

## 2. Prepare the Agent Config

1. Navigate to the parent folder on your computer that includes the extracted `opt/thousandeyes/cdev/router_agent_updater/` package:

   ```bash
   cd /my/extracted/agent/folder
   ```
2. In your preferred editor, replace the three `CHANGE ME` values below with your organization's `client` string, authentication `secret`, and device `base` model or SKU. Get the `client` string and `secret` from your ThousandEyes contact.

   Paste the entire block into the terminal at once:

   ```bash
   cat > ./opt/thousandeyes/cdev/router_agent_updater/etc/skagent.cfg <<'CONFIG'
   [identity]
   # 1-20 characters: lowercase letters, digits, -, _, or +
   base='CHANGE ME'
   client='CHANGE ME'
   # Example MAC identity
   mac='02:00:00:00:00:01'

   [authentication]
   secret='CHANGE ME'

   [metadata]
   Firmware='examplefirmwareversion'

   [resource_checker.cross-traffic]
   input='/sys/class/net bytes'

   [resource_checker.cross-traffic.interfaces]
   input='default route'

   [updater.cdev_package]
   working_directory='/tmp/cdev'
   CONFIG
   ```
3. View the configuration file to confirm that it contains the updated values:

   ```bash
   cat ./opt/thousandeyes/cdev/router_agent_updater/etc/skagent.cfg
   ```

{% hint style="warning" %}
If you have already installed an agent on this device for the same organization (`client`), you cannot configure a different `base` value. The agent can still activate, but the ThousandEyes platform continues to show the `base` value from the first installation. See [Identity and ISP routing](https://docs.thousandeyes.com/product-documentation/connected-devices/device-agents/configuration/identity-and-isp-routing.md).
{% endhint %}

## 3. Copy the Agent Updater and Configuration

1. Connect the device as shown:

   | Connection                                                                                | Purpose                               |
   | ----------------------------------------------------------------------------------------- | ------------------------------------- |
   | LAN or serial connection to your computer                                                 | Agent file transfer and configuration |
   | WAN internet connection matching the intended production speed tier and access technology | Activation and measurement            |
2. Copy the agent files and prepared configuration to the device.

   On your computer, return to the extracted package folder:

   ```bash
   cd /my/extracted/agent/folder
   ```

   Replace `192.168.3.1` below with your device's LAN IP address to copy the agent `cdev` directory to the target device.

   ```bash
   export DEVICE_IP=192.168.3.1
   scp -r ./opt/thousandeyes/cdev "root@$DEVICE_IP:/tmp/"
   ssh "root@$DEVICE_IP"
   ```

   Enter the device password if prompted.

   The Agent Updater executable should now be in `/tmp/cdev/router_agent_updater/bin/router_agent_updater`, and its configuration should be in `/tmp/cdev/router_agent_updater/etc/skagent.cfg`.
3. Confirm that both files arrived by running the following:

   ```bash
   test -x /tmp/cdev/router_agent_updater/bin/router_agent_updater && \
     echo "Updater copied"

   test -r /tmp/cdev/router_agent_updater/etc/skagent.cfg && \
     echo "Configuration copied"
   ```

   Verify that the terminal displays both confirmation messages.

## 4. Test the Agent

Continue in the SSH session on the target device.

1. Confirm WAN connectivity:

   ```bash
   ping -c 2 8.8.8.8
   nslookup agent.sk.thousandeyes.com
   curl -I --connect-timeout 10 https://agent.sk.thousandeyes.com/
   ```

   DNS and outbound HTTPS must work. If any command returns an error, stop and fix the connection before continuing.
2. For Agent Updater v7.16 or later, run the Updater in self-test mode. Do not start it separately first:

   ```bash
   cd /tmp/cdev/router_agent_updater
   ./bin/router_agent_updater --self-test-mode
   ```

   <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>Agent Updater versions earlier than v7.14 do not support self-test mode.</p><p>Agent Updater versions v7.14 and v7.15 require you to run the installed agent in self-test mode. First, start the Updater in the foreground:</p><pre class="language-bash"><code class="lang-bash">cd /tmp/cdev/router_agent_updater
   ./bin/router_agent_updater
   </code></pre><p>Use your terminal's search function to confirm that the following sequence appears near the start of the output:</p><pre><code>[info] [updater] Service started
   [info] [service] Instance ...: Created process with PID ...
   [info] [service] [stderr] ... Bootstrapping at URL ...
   </code></pre><p>Press <code>Ctrl+C</code> to stop the foreground Updater. Then run the installed agent in self-test mode and pass the Updater configuration:</p><pre class="language-bash"><code class="lang-bash">cd /tmp/cdev/installation
   bin/skagent -K
   bin/skagent \
     --config-file /tmp/cdev/router_agent_updater/etc/skagent.cfg \
     --self-test-mode
   </code></pre></div>
3. If a test fails or you encounter an installation or activation issue, use the applicable troubleshooting guide:
   * For self-test failures, follow [Validate with self-test mode](https://docs.thousandeyes.com/product-documentation/connected-devices/device-agents/validation-and-troubleshooting/validate-with-self-test-mode.md).
   * For installation or activation failures, follow [Installation and activation troubleshooting](https://docs.thousandeyes.com/product-documentation/connected-devices/device-agents/validation-and-troubleshooting/installation-and-activation-troubleshooting.md).

## 5. Confirm Speed Results Are Satisfactory

Your first self-test speed measurements should be close to, but slightly below, the theoretical maximum speeds.

By default, self-test mode targets servers outside your network to reflect the home broadband experience. Latency to those servers can reduce throughput.

TCP tests reach about 94% of line rate. On a 1 Gbps line, the theoretical maximum is 940 to 949 Mbps. Added latency might reduce throughput by up to 20%.

{% hint style="info" %}
**Troubleshooting Low Speed Results**

If self-test passes but speed is below the intended tier, follow [Speed quick wins](https://docs.thousandeyes.com/product-documentation/connected-devices/device-agents/validation-and-troubleshooting/speed-quick-wins.md).
{% endhint %}

### Verifying the Agent in ThousandEyes

Use the unit ID from the self-test output to verify that the agent appears in the expected organization under **Connected Devices > Settings > Agent Settings > Agents**.

### Removing the Lab Installation

If the Updater is still running, stop it with `Ctrl+C`. Rebooting normally clears the Updater, configuration, and downloaded agent because they are under `/tmp`.

## Next Steps

After the target passes, continue to [Plan, deploy and update the Agent](https://docs.thousandeyes.com/product-documentation/connected-devices/device-agents/plan-deploy-and-update-the-agent.md).
