How To Run a Bash Script From Linux Server

In this blog post, I will show you how to run a Bash script from a Linux server Bash shell terminal.

By default, running scripts is not possible if they don’t have run permissions on the file system.

Create script

The process to allow running Bash scripts is to first create the script with a .sh file extension as shown below:

touch script.sh

Give permissions

After creating the file, lets give it run permissions.

chmod u+x script.sh

Run

And finally to run the script, use.

.\script.sh

Processing…
Success! You're on the list.

Posted

in

by