Installing or uninstalling the Linux Agent

SECURITY Administrator permissions on the device
NAVIGATION Sites > open a site > New Device
Linux Agents run on the Mono framework, the open source version of .NET for UNIX O/S.
How to...

IMPORTANT For information about supported Linux versions, refer to Operating systems. For information about which services get installed, refer to Services, dependencies, and folders (Windows, macOS, Linux).
NOTE If a previous version of MONO is already installed on the device, it may have to be removed prior to re-installation by the Agent.
- Refer to the steps outlined in Downloading or emailing the Agent installer in the current UI or in Downloading the Agent or sharing the Agent installer in the New UI.
NOTE Linux devices can only be added to Managed sites.
NOTE The Linux Agent setup file will have a .sh extension (e.g. AgentSetup_Managed.sh).
- Open your Terminal app.
- Change the directory to the folder that contains the .sh file:
cd[folder containing the Datto RMM .sh file]
- Type:
sudo sh AgentSetup_[filename].sh
- Enter your password when prompted.
- The Agent will be installed.
- Close the terminal window when you are able to type text into the window again.
Your device should now appear in the Datto RMM Web Portal.

To install the Agent on a Linux device via the Terminal:
- Choose the type of Mono that should be installed on the device.
- Open your Terminal app and type the following to download the Agent:
sudo wget [the web address of the Linux Agent from your site] -O agent.sh
NOTE In order to get the web address of the Agent, navigate to the site you want to add the device to > click New Device > select Linux > right-click the download link and copy the link address.
- Once the Agent has been downloaded, type:
sudo sh [the path and filename of the Agent]
or
sudo bash [the path and filename of the Agent]
- Alternatively, to both download and install the Agent, type:
sudo wget -O setup.sh [the web address of the Linux Agent from your site] && sudo sh setup.sh
- The Datto RMM Agent will now be installed.

IMPORTANT If you are uninstalling the Linux Agent from Red Hat, ensure that your username is included on the sudoers list. If it is not, please see this guide which explains how to do so.
IMPORTANT If you are running other tools or applications that use Mono, note that Mono is removed during this uninstall process.
To uninstall the Agent on a Linux device, follow the steps below depending on which operating system type you are using:

To uninstall the Agent on a Red Hat-based operating system, open your Terminal app and type:
sudo chmod +x /opt/CentraStage/uninstall.sh
sudo /opt/CentraStage/uninstall.sh
sudo rm -fr /opt/CentraStage
sudo rm -fr /usr/local/share/CentraStage
sudo rm -fr /root/.local/share/CentraStage
sudo yum remove mono-runtime
To ensure the system is up-to-date, type:
sudo yum -y update && sudo yum -y upgrade
To download and install a fresh copy of the Datto RMM Agent, type:
wget -O agent.sh "URL"
chmod +x agent.sh
sudo ./agent.sh

To uninstall the Agent on a Debian-based operating system, open your Terminal app and type:
sudo chmod +x /opt/CentraStage/uninstall.sh
sudo /opt/CentraStage/uninstall.sh
sudo rm -fr /opt/CentraStage
sudo rm -fr /usr/local/share/CentraStage
sudo rm -fr /root/.local/share/CentraStage
sudo apt-get purge mono-runtime
To ensure the system is up-to-date, type:
sudo apt-get -y update && sudo apt-get -y upgrade
To download and install a fresh copy of the Datto RMM Agent, type:
wget -O agent.sh "URL"
chmod +x agent.sh
sudo ./agent.sh