1.首先打出 gedit hello.sh 创建一个hello.sh的文件。在文件中输入如下内容: #!/bin/bash echo "Hello world!" 保存。 然后在cmd中打出: chmod +x hello.sh ./hello.sh 完成,觉得有帮助的话,点个赞吧。