– 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.
How to Create and Apply a Run Script Job to a Linux device?
To create and apply a Run Script Job, follow the below mentioned steps:
1. Login to SureMDM Web Console
2. Click on Jobs
3. Click on New Job and then select OS as Linux
4. Click on Run Script
5. On 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 Apply Job To Device prompt, select the job and click on Apply
(Note: All the Shell commands that support Linux can be used in SureMDM Run Script job as well.)
Here are some sample scripts which can be used to perform actions such as:
1. Create file
#!/bin/bash cd /home/ubuntu cat >File.txt
2. Make directory:
3. Move file from one folder to other:
mv Folder_1 Folder_2
4. Remove file (Example- TeamViewer):
rm -r File_Name
5. To install the application:
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
sudo sh -c "echo y | dpkg -i teamviewer_amd64.deb"
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.