Syntax

Bash Shebang Line Syntax

In Bash, shebang line: makes a script run with Bash — #!/bin/bash

Quick Answer

Syntax
#!/bin/bash
BashSyntax

Shebang Line

Code example
#!/bin/bash

Makes a script run with Bash.

Learn More

How to shebang line in Bash

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

Bash Shebang Line Syntax

Use #!/bin/bash.

Related Syntax References

Frequently asked questions

What is the Bash syntax for shebang line?

Use this pattern: #!/bin/bash

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