The customary first program!
Create a new file and save as .sh file 'hello.sh'
Use vi as it's always available, otherwise use a good text editor that will preserve line-endings.
#! /bin/bash echo "Hello, World!"
- First line consists of #! (aka shebang) and path to bash /bin/bash
- Followed by echo "and text to be echoed to the terminal".
Next, make it executable:
chmod +x hello.sh
So, it can now be run: