---
title: "Install IT Agent on Linux | Lansweeper Platform"
slug: "install-it-agent-linux"
description: "Install the Lansweeper IT Agent on Linux to discover and track assets. Covers Debian, Ubuntu, Red Hat, SUSE packages, and a deployment script."
status: "update"
updated: 2026-08-13T14:08:39Z
published: 2026-08-13T14:08:39Z
canonical: "docs.lansweeper.com/install-it-agent-linux"
---

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

# Install IT Agent - Linux

Use the IT Agent Discovery to identify and track assets that connect to your network.

## Prerequisites

- Review the [Discovery IT Agent requirements](/docs/discovery-agent-requirements)
- Review the supported operating systems

## Supported operating systems

**.deb packages**:

- Debian 12 (x64, current stable and previous release)
- Ubuntu 22.04 LTS (x64, current LTS and previous LTS)

**.rpm packages**:

- Alpine Linux 3.19 (x64, current and previous stream release)
- Azure Linux 3.0 (x64, current and previous stream release)
- CentOS Stream 9 (x64, current and previous stream release)
- Fedora 40 (x64, current and previous release)
- openSUSE Leap 15.6 (x64, current and previous release)
- Red Hat Enterprise Linux 8 (x64, current and previous minor release)
- SUSE Linux Enterprise Server (SLES) 15 SP6 (x64, current and previous service pack)

## Install the agent

Debian/UbuntuRed Hat/CentOSSUSEDeployment script

1. On your preferred site, navigate to **Discovery > Systems > Download Installers/Packages**.
2. Select **IT Agent Discovery > Download the Lansweeper repository package** for the **Linux Debian** OS.
3. Open a terminal and install the package:

```bash
sudo dpkg -i ./lansweeper-repository.deb
sudo apt update
```
4. On your site, select **Systems > Link discovery system > Create new code**. Specify an expiration date, then select **Apply** and copy the generated code.
5. Install the agent. Replace `cloudtokenvalue` with your actual linking code and run:

```bash
sudo env LINKING_CODE=cloudtokenvalue apt install lansweeper-it-agent
```

If you're using a proxy server, add the `PROXY_SERVER` and `PROXY_PORT` parameters:

```bash
sudo env LINKING_CODE=cloudtokenvalue PROXY_SERVER=<your_proxy_server> PROXY_PORT=<your_proxy_port> apt install lansweeper-it-agent.x86_64
```

1. On your preferred site, navigate to **Discovery > Systems > Download Installers/Packages**.
2. Select **IT Agent Discovery > Download Lansweeper repository package** for the **Linux Red Hat** OS.
3. Open a terminal and install the repository package you copied to your machine:

```bash
sudo dnf install ./lansweeper-repository-x.0.0-0.x86_64.rpm
sudo dnf update
```
4. On your site, select **Systems > Link discovery system > Create new code**. Specify an expiration date, then select **Apply** and copy the generated code.
5. Install the agent. Replace `cloudtokenvalue` with your actual linking code and run:

```bash
sudo env LINKING_CODE=cloudtokenvalue dnf install lansweeper-it-agent.x86_64
```

If you're using a proxy server, add the `PROXY_SERVER` and `PROXY_PORT` parameters:

```bash
sudo env LINKING_CODE=cloudtokenvalue PROXY_SERVER=<your_proxy_server> PROXY_PORT=<your_proxy_port> dnf install lansweeper-it-agent.x86_64
```

1. On your preferred site, navigate to **Discovery > Systems > Download Installers/Packages**.
2. Select **IT Agent Discovery > Download Lansweeper repository package** for the **Linux Red Hat** OS.
3. Open a terminal and install the repository package you copied to your machine:

```bash
sudo rpm -ivh ./lansweeper-repository-x.0.0-0.x86_64.rpm
```
4. On your site, select **Systems > Link discovery system > Create new code**. Specify an expiration date, then select **Apply** and copy the generated code.
5. Install the agent. Replace `cloudtokenvalue` with your actual linking code and run:

```bash
sudo env LINKING_CODE=cloudtokenvalue zypper install lansweeper-it-agent.x86_64
```

If you're using a proxy server, add the `PROXY_SERVER` and `PROXY_PORT` parameters:

```bash
sudo env LINKING_CODE=cloudtokenvalue PROXY_SERVER=<your_proxy_server> PROXY_PORT=<your_proxy_port> zypper install lansweeper-it-agent.x86_64
```

1. Copy the following script:

```bash
#!/bin/bash
set -e
# ----------------------------
# Lansweeper IT Agent Installer Script
# ----------------------------
# Set your cloud token here
cloudtoken="cloudtokenvalue"
# Check system architecture
ARCH=$(uname -m)
if [[ "$ARCH" != "x86_64" && "$ARCH" != "amd64" ]]; then
    echo "   Lansweeper IT Agent Discovery is only available for amd64 (x86_64)."
    echo "   You are running: $ARCH"
    echo "   Please use an x86_64 VM or Docker container with --platform linux/amd64."
    exit 1
fi
# Check curl/wget
if ! command -v curl &>/dev/null && ! command -v wget &>/dev/null; then
    echo "   Neither curl nor wget found. Please install one of them."
    echo "   Example (Debian/Ubuntu): sudo apt install curl -y"
    echo "   Example (RHEL/Fedora):   sudo dnf install curl -y"
    exit 1
fi
# Detect distro family
if [ -f /etc/debian_version ]; then
    PKGTYPE="deb"
    INSTALLER_URL="https://download.lansweeper.com/deb-repository/stable/latest"
    INSTALLER_PATH="/tmp/lansweeper-it-agent.deb"
    INSTALL_CMD="sudo dpkg -i $INSTALLER_PATH || sudo apt-get install -f -y"
elif [ -f /etc/redhat-release ] || [ -f /etc/centos-release ] || [ -f /etc/fedora-release ]; then
    PKGTYPE="rpm"
    INSTALLER_URL="https://download.lansweeper.com/rpm-repository/stable/latest"
    INSTALLER_PATH="/tmp/lansweeper-it-agent.rpm"
    INSTALL_CMD="sudo rpm -i $INSTALLER_PATH || sudo dnf install -f -y"
else
    echo " Unsupported Linux distribution."
    exit 1
fi
echo " Downloading Lansweeper IT Agent Discovery installer for $PKGTYPE..."
# Download installer
if command -v curl &>/dev/null; then
    curl -L -o "$INSTALLER_PATH" "$INSTALLER_URL"
else
    wget -O "$INSTALLER_PATH" "$INSTALLER_URL"
fi
echo " Installing Lansweeper IT Agent Discovery with cloud token..."
# Create config file with cloudtoken
CONFIG_PATH="/etc/lansweeper-it-agent/itagent.conf"
sudo mkdir -p /etc/lansweeper-it-agent
cat <<EOF | sudo tee "$CONFIG_PATH" >/dev/null
{
  "cloudtoken": "$cloudtoken"
}
EOF
# Silent install
eval "$INSTALL_CMD"
# Remove installer
rm -f "$INSTALLER_PATH"
echo "   Installation completed."
echo "   Cloud token has been set in: $CONFIG_PATH"
echo "   If your token changes, re-run this script to update it."
```
2. On your site, select **Systems > Link discovery system > Create new code**. Specify an expiration date, then select **Apply** and copy the generated code.
3. In the first section of the script, replace `cloudtokenvalue` with your copied linking code.
4. Save your file as a Bash script, for example: `install-ls-it-agent.sh`.
5. Make the script executable by running: `chmod +x install-ls-it-agent.sh`.
6. Run the script with elevated permissions: `sudo ./install-ls-it-agent.sh`.

  

---

  
    

## Troubleshooting

    
      

#### Installation fails with "Unable to locate package lansweeper-it-agent"

        
        
          

Verify the device has outbound access to [the URLs required for IT Agent Discovery](/docs/discovery-agent-requirements), in particular the discovery gateway and download domains.

        
      
    
  

## Next steps

Now that your IT Agent is installed, you can [create a discovery action](/docs/create-an-it-agent-discovery-action) to specify when discovery should occur.
