
Every binary is for the different groups. The above has permission “rw” for the current user, “r” for the user groups and “r” for others. One for the current user, the second for user groups and the third for others. The permissions are written in the form of “r” for read, “w” for write and “x” for execute. To view the permissions of all files, type: ls -l To view the permission of a specific file, type: ls -l xampp.sh To give read, write and execute permissions, assign the value of “7”, this is given by combining the permissions 4, 2 and 1 to obtain 7. To give read permission, give values of “4”, to give both read and write permissions assign value “6”, this is gotten from adding the 4 and 2 giving combined permissions of 6. To know more about Linux permissions, we’ve dedicated an article to it. No permission is granted with a value of 0.Execute- execute permissions have a value of 1.Write – write permissions have a value of 2.Read – read permissions have a value of 4.The permissions part is composed of binary numbers that show the permission.

To run the script you will have to change the permissions to 775. Once done press the enter key to save.We have successfully created a simple shell script. 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.
