新建helloWord.sh,内容如下: echo 'hello word!' chmod +x ./helloWord.sh #给文件赋可执行的权限 ./helloWord.sh #执行文件,输出如下