How to make a Linux or Mac shell script executable

  1. Open Terminal
  2. Make the script executable by typing: chmod a+x (yourscriptname)
  3. In Finder, right-click the file
  4. Select “Open with” and “Other…”
  5. Here you select the application you want the file to execute into, in this case it would be Terminal.
    • To be able to select Terminal, you need to switch from “Recommended Applications” to “All Applications”.
    • The application can be found in the Utilities folder
  6. After clicking OK you should be able to execute the script by simply double-clicking it.