# Your First Bash Script — Linux

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

> From a text file to an executable script.

## 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`.
