macos create file executable code example Example 1: macos make file executable chmod +x filename.sh Example 2: macos make file executable chmod 755 YourScriptName.sh