gedit hello.sh 

,然后输入

#!/bin/bash
echo "Hello world!"

chmod +x hello.sh

./hello.sh