– Installing applications
– Creating and Deleting directory
– Creating and Deleting files
– Configuring read/write/execute permissions to files
– moving files between folders
Executing Linux shell commands requires creating a Run Script job in SureMDM Web Console and applying it to the device.
Steps to create and apply a Run Script job to a Linux device
1. Login to SureMDM Web Console.
2. Click Jobs.
3. Click New Job and then select OS as Linux.
4. Click Run Script.
5. On the Run Script prompt, enter run scripts and click on Save.
6. Go to SureMDM Home, select the desired Linux device and click on Apply.
7. On the Apply Job To Device prompt, select the job and click on Apply.
Some sample scripts which can be used to perform actions
1. Create file
#!/bin/bash cd /home/ubuntu cat >File.txt
2. Make directory:
#!/bin/bash cd /home/ubuntu mkdir Folder_Name
3. Move file from one folder to other:
#!/bin/bash cd /home/ubuntu mv Folder_1 Folder_2
4. Remove file (Example- TeamViewer):
cd /home/ubuntu rm -r File_Name
5. To install the application:
#!/bin/bash sudo sh -c "echo y | sudo apt-get -f install sudo sh -c "echo y | sudo apt-get install gdebi sudo wget https://download.teamviewer.com/download/linux/teamviewer_amd64.deb sleep 10 sudo sh -c "echo y | dpkg -i teamviewer_amd64.deb" sleep 5 sudo apt-get install
6. Get Permission pop up to grant access for Remote support:
Run Script feature is supported on other OS platforms as well. To explore this feature for Android and iOS devices, click here.
For a free trial for SureMDM, register here.