1、作为可执行程序 chmod +x ./test.sh #使脚本具有执行权限 ./test.sh #执行脚本 注:zsh: permission denied: ./test.sh 2、作为解释器参数 /bin/sh test.sh /bin/php test.php