How To Create A Basic “Hello World” Program In Bash

You can use bash execute scripts for the terminal.

1. Create a new bash file using any text editor

sudo gedit test.sh

2. Enter the following to the top of the program

#! /bin/bash/

3. Enter the following to echo hello world

echo “Hello World”

4. Now you can run your program by using the following code

bash test.sh

5. You should get the following output…

$  Hello World

That’s it! You have create a bash program