1 cd到.sh文件所在目录

$ cd xxx

2 给.sh文件添加x执行权限

$ chmod u+x hello.sh

3 ./执行.sh文件

$ ./hello.sh

参考资料:

1、Linux下面如何运行.sh文件?
https://jingyan.baidu.com/article/3f16e003e51a752591c103a4.html