Syntax

Bash Make a Script Executable Syntax

In Bash, make a script executable: gives a script permission to run — chmod +x script.sh

Quick Answer

Syntax
chmod +x script.sh
BashSyntax

Make a Script Executable

Code example
chmod +x script.sh

Gives a script permission to run.

Learn More

How to make a script executable in Bash

  1. Open your Bash file or editor.
  2. Copy the example, then replace its sample names and values for your code.

Bash Make a Script Executable Syntax

Use chmod +x script.sh.

Related Syntax References

Frequently asked questions

What is the Bash syntax for make a script executable?

Use this pattern: chmod +x script.sh

Can I copy this Bash code example?

Yes. Use Copy code and adapt the example to your program.

Is this Bash syntax different on Mac or Windows?

No. The language syntax is the same across operating systems.

Official source · How we verify