Bash Script: Simple text file that stores a series of commands, typically entered in the command line, to automate tasks in the Linux system.
How to Write Bash Scripts?
Ensure you're in the desired directory by using pwd
command and if not then change to desired directory using cd
command
- Create file with .sh extension:

Execute the Script prefixing with ./file_name
- Open the script in text editor:
gedit apoo.sh
If gedit is not installed then run brew install gedit
- Write down the bash script command within it:
💡 Every Bash script for Linux should start with the shebang line- "#!/bin/bash"
Let’s start with the programming ritual- ‘Hello World’

If you excecute this file now, it will give permission denied.
- Provide execution permission and execute it:
