How to Run the .sh File Shell Script In CentOS/RHEL

Share this Article :

I have created a shell script with the extension .sh on my linux CentOS server. This script will be scheduled using crontab. Before start to run the crontab for that script, there is important step that we must follow. Otherwise all the created script will not running. We have to set an executable permission for the created script using the chmod command. In unix/linux environment, chmod purpose is to change access permissions for any files or folders.

Also Read :   How to Show Line Number in vi or vim Editor

To change the executable permission on my script called is as below:

    chmod +x


    chmod 0755

Note : Allow execute permission to everyone explanation as below

    User (rwx) = 4+2+1 = 7
    Group(rx) = 4+1 = 5
    World (rx) = 4+1 = 5
    chmode mode = 0755 

Leave a Reply