# Your First Bash Script — Linux Command Line Fundamentals

Source: https://www.skillbyai.com/en/linux/linux-bash-script-basics

> Write your first Bash script with a shebang, make it executable with chmod and run it.

## The shebang

A script's first line, `#!/bin/bash`, tells the OS which interpreter should run it — this is the **shebang**.

## Write and run it

Save the script, make it executable, then run it.

```bash
#!/bin/bash
echo "Hello, $(whoami)!"
```

Output:

```
Hello, alice!
```

## chmod +x to run it

Save as `greet.sh`, run `chmod +x greet.sh`, then execute with `./greet.sh`.
