1

I would like to create a file, which could be saved in the Desktop or in another folder, which upon a user double click on it executes some commands, one of which should be as super user (sudo) and which executes another file.

An example of the commands I would like to execute could be this one:

cd Desktop/TargetFolder
sudo ./FileToExecute

Thank you very much!

Ignasi
  • 166

1 Answers1

0

Creating an .sh (same as .exe in Windows) file would do. You can make it executable by this command: chmod +x nameofscript.sh

You may have a look at this one as well which elaborates a bit more.