How to create clickable executable file that works like an .exe file on Windows?

Solution 1:

Short answer:

chmod +x /path/to/your/script

Unix will only run files which have the "executable bit" set in their "mode" for the user trying to run it. chmod let's you change a file (or directory) mode. See https://en.wikipedia.org/wiki/File-system_permissions#Permissions or for details on how to use it try man chmod.

For a script, it also needs to have a "shebang line" defining which script interpreter should run it.