Write shell script

broken image
broken image
broken image
broken image

When done writing commands, press CTRL + X to exit and save the script. I am going to create a script that starts LAMP. sh” extension. Type “nano” in the terminal to open the nano editor.Ī shell script always starts with – #!/bin/bash Then type your commands after that. We are going to use the inbuilt nano editor to create a shell script. The shell scripts are really easy to create and run saving you from a lot of misery and anguish if you really prefer using the terminal over using the GUI for running tasks. Having to type the same command over and over again can be a daunting task and tiresome for that matter.

broken image