# How to Install and Uninstall Linux Agent This guide provides detailed instructions for installing and uninstalling Linux agents, including manual and remote installation methods, prerequisites, system requirements, and agent privileges. ## Table of Contents 1. [Pre-requisites](#pre-requisites) 2. [Manual Linux Agent Installation](#manual-linux-agent-installation) 3. [Installing Linux Agents Remotely from the Web Console](#installing-linux-agents-remotely-from-the-web-console) 4. [Installing Linux Agents Using IP Range or SSH Keys](#installing-linux-agents-using-ip-range-or-ssh-keys) 5. [Installing Linux Agents Using Linux OS Imaging](#installing-linux-agents-using-linux-os-imaging) 6. [How to Uninstall Linux Agent](#how-to-uninstall-linux-agent) 7. [Conclusion](#conclusion) 8. [Related Articles](#related-articles) ## Pre-requisites - **Linux Agent Configuration:** Ensure the Linux agent settings are configured [know more](https://www.manageengine.com/products/desktop-central/help/configuring_desktop_central/managing_linux_computers.html#how-to-configure-linux-agent-settings). - **Privileges:** Agent installation requires sudo/root permission. After installation, the agent runs with root privileges, except for UI tasks, which run as a normal user. - **Service Compatibility:** The Linux machine should run under SystemD or SysVinit service, as the agent service is compatible only with these services. - **Supported architectures** include x86, x86_64, ARM (32-bit and 64-bit). Please make sure that the 64-bit machines support 32-bit binary execution. - **Required Packages:** - tar package, version 1.29 or above. - xz or xz-utils, depending on the type of Linux OS. - libgtk-3-0 or gtk3.x86_64 - libwebkit2gtk-4_0-37 or webkitgtk4-plugin-proces-gtk2.x86_64 or webkitgtk4 or webkit2gtk or webkit2gtk4.1 or webkitgtk6.0 depending on the type of Linux OS. ## Manual Linux Agent Installation Linux agents can be installed manually on computers that need to be managed. The agents should be downloaded onto the target Linux computer before initiating the installation process. 1. Navigate to **Agent → Computers** and click **Download Agent**. [![download agent for linux devices](https://www.manageengine.com/products/desktop-central/images/linuxagentinstall.png)](https://www.manageengine.com/products/desktop-central/images/linuxagentinstall.png) 2. Select Platform as **Linux**, and select **Domain/Workgroup** from the dropdown. 3. Choose Processor: **x86, x64, ARM32, or ARM64.** > **Note** > The downloaded agent installer name varies based on the processor selected. The following are the agent installer names for each processor type: > > - **UEMS_LinuxAgent.bin** — x86 (32-bit Intel/AMD) > - **UEMS_LinuxAgent_x64.bin** — x64 (64-bit Intel/AMD) > - **UEMS_LinuxAgent_ARM.bin** — ARM (32-bit) > - **UEMS_LinuxAgent_ARM64.bin** — ARM64 (64-bit) > > The corresponding ZIP file will be named **(remoteoffice_name)_.zip** > (e.g., **(remoteoffice_name)_UEMS_LinuxAgent_x64.zip**) [![download agent for linux devices endpoint central](https://www.manageengine.com/products/desktop-central/images/linuxagentinstal2.png)](https://www.manageengine.com/products/desktop-central/images/linuxagentinstal2.png) 4. **Copy the Agent to the Target Computer:** - Use `scp` to copy the downloaded agent to the remote computer where the agent needs to be installed. - `scp (remoteoffice_name)_ username@hostname:Path_To_Storage_Directory_If_Needed` - **username:** Root username of the target computer. - **hostname:** Local hostname of the target computer. - If no path is specified, the agent will be copied to `/home/username` on the target computer. 5. **Install the Agent on the Target Computer:** - Open the terminal and log into the target computer: ``` ssh username@hostname ``` - Log in as the root user. If not logged in as root, use the `sudo` command and enter the password when prompted to perform each operation. 6. **Navigate to Downloaded Agent Location:** - Go to the directory where the agent has been downloaded. 7. **Unzip the UEMS Agent:** - Unzip the `(remoteoffice_name)_` file using the command: ```bash unzip -e (remoteoffice_name)_UEMSLinuxAgent.zip ``` 8. **Verify Files:** - Confirm that `UEMS_LinuxAgent.bin` (or the appropriate installer for your architecture) and `serverinfo.json` are in the same directory. 9. **Set Executable Permissions:** - As a root user, make the installer executable with the following command (replace `` with the applicable file name): ```bash chmod +x ``` 10. **Run the Installer:** - Execute the installation command as follows (replace `` with the applicable file name): ```bash ./ ``` - By default, the agent will be installed in the `/usr/local/manageengine/uems_agent/` directory. - To install the agent in a different folder, use the `-d` argument with the installer and enter your preferred path: ```bash ./UEMS_LinuxAgent_x64.bin -d /opt ``` The agent will be installed at `/opt/manageengine/uems_agent/`. ## Installing Linux Agents Remotely from the Web Console For computers within the LAN, agents can be installed by selecting the desired computers and invoking agent installation through the web console: 1. **Configure Credentials in Linux Agent Settings** 1. Go to **Linux Agent Settings** under **Agent Settings** on the **Agent** tab. 2. Click **Add Credentials** to add a new credential. 3. Enter **Credential Name**, **Type**, **Domain**, **Username**, and **Password**, then click **Save**. 4. Select the credentials and click **Save Changes**. [![configure credentials for installing the linux agents remotely from the web console](https://www.manageengine.com/products/desktop-central/images/linuxagentinstal4.png)](https://www.manageengine.com/products/desktop-central/images/linuxagentinstal4.png) > **Note** > - These credentials will be used for SSH access to the Linux machine to perform the agent installation. Ensure that the credentials have SSH access and `sudo` permissions for installation. They are not used by the agent for any other purpose. > - If you are facing trouble with SSH access [click here](https://www.manageengine.com/products/desktop-central/agent-installation-failure-for-mac-linux.html). > - For invoking the installation on client computers, the **SSH port (default port 22)** should be open on the computers where the agent needs to be installed. The SSH port is used only for agent installation purposes and not for agent-server communication. 2. **Add the Computer to the Scope of Management (SoM)** 1. Navigate to **Agent > Computers** and click the **+Add Computer(s)** button to open the Add Computer popup. [![adding computers to som for installing linux agents remotely](https://www.manageengine.com/products/desktop-central/images/linuxagentinstal5.png)](https://www.manageengine.com/products/desktop-central/images/linuxagentinstal5.png) 2. If you've added a domain: - Choose your domain from the dropdown. - Select the computer(s) you want to add and click **Next**. [![select the computers you want to add to the scope of management](https://www.manageengine.com/products/desktop-central/images/linuxagentinstal6.png)](https://www.manageengine.com/products/desktop-central/images/linuxagentinstal6.png) 3. The selected computer(s) will now list on the next screen. Here, you can: - Choose the **Remote Office** from the dropdown. - Click **Install Agents** to start installation immediately, or click **Add to SoM** to add the computer(s) to the Computers page for later installation. [![from the selected computers you can chose to install agents or add to som](https://www.manageengine.com/products/desktop-central/images/linuxagentinstal7.png)](https://www.manageengine.com/products/desktop-central/images/linuxagentinstal7.png) 4. Alternatively: - Click the computer icon in the upper-right corner. [![you can also add computers manually](https://www.manageengine.com/products/desktop-central/images/linuxagentinstal8.png)](https://www.manageengine.com/products/desktop-central/images/linuxagentinstal8.png) - Enter the name(s) of the computer(s) to add, separated by commas (e.g., `computer1, computer2`). - Press **Enter** to add the computer(s). - Choose the **Remote Office** and click **Install Agents** for immediate installation, or **Add to SoM** for later installation. [![dwg trueviewer](https://www.manageengine.com/products/desktop-central/images/linuxagentinstal9.png)](https://www.manageengine.com/products/desktop-central/images/linuxagentinstal9.png) 3. **Initiate Agent Installation** - Click the **Install Agent** icon in the left corner. - Agent installation will be initiated. ## Installing Linux Agents Using IP Range or SSH Keys To install Linux agents using a Distribution Server or AWS, follow the steps mentioned on the designated installation [page](https://www.manageengine.com/products/desktop-central/linux-agent-installation-remote-office.html). ## Installing Linux Agents Using Linux OS Imaging To install Linux agents using Linux OS Imaging, follow the steps mentioned on the designated installation [page](https://www.manageengine.com/products/desktop-central/preinstalling-desktop-central-agent-image-in-linux-os-how-to.html). ## How to Uninstall Linux Agent ### Manual Uninstallation 1. **Navigate to the Agent Installation Directory:** ```bash cd /usr/local/manageengine/uems_agent/ ``` 2. **Set Executable Permissions:** ```bash chmod +x RemoveUEMSAgent.sh ``` 3. **Run the Removal Script:** ```bash ./RemoveUEMSAgent.sh ``` 4. **OTP Prompt (if Agent Protection Settings enabled):** You will be prompted to choose between GUI or CLI for input and provide the OTP. [Learn more about Agent Protection Settings](https://www.manageengine.com/products/desktop-central/help/configuring_desktop_central/configuring_agent_tray_icon_settings.html#aps). 5. The agent will be uninstalled. ### SOM Uninstallation 1. **Remove from SOM:** Removing the computer from SOM will trigger the agent uninstallation on its next refresh cycle or immediately if the NS is live and marked as "green". [![uninstalling agents via som by removing computers](https://www.manageengine.com/products/desktop-central/images/linuxagentinstal1l.png)](https://www.manageengine.com/products/desktop-central/images/linuxagentinstal1l.png) 2. **Uninstall via Server Trigger:** Selecting "Uninstall Agent" from the server will initiate an SSH-triggered uninstallation. This is applicable for On-Premises (local & DS) as well as Cloud DS deployments. This option is not available for MSP. [![uninstalling agents via uninstall agents option](https://www.manageengine.com/products/desktop-central/images/linuxagentinstal12.png)](https://www.manageengine.com/products/desktop-central/images/linuxagentinstal12.png) ## Conclusion This guide provided the necessary steps to install, configure, and uninstall UEMS Linux agents on supported systems using manual, remote, and distribution-based methods. Follow the outlined instructions for seamless agent management on Linux systems. ## Related Articles 1. [Managing Linux Computers](https://www.manageengine.com/products/desktop-central/help/configuring_desktop_central/managing_linux_computers.html)