run a .sh from terminal code example Example 1: run sh from terminal mac chmod +x fileName bash fileName Example 2: how to run a .sh file ./yourscript.sh