shell Getting started with shell Hello World

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Example

At the command prompt:

$ echo "Hello World"

Output:

Hello World

To create a script, create a text document with the following content:

#!/bin/sh
echo "Hello World"

Save the script with the name hello.sh (or any filename) and make the script executable by giving the following permission:

$ chmod 755 hello.sh

Or:

$ chmod +x hello.sh

Run the script:

$ ./hello.sh

Output:

Hello World

To run a local shell script without executable permission:

1.bash

$ bash hello.sh
Hello World

2.ksh

$ ksh hello.sh
Hello World

3.sh

$ sh hello.sh
Hello World


Got any shell Question?