-2

What is the significant of using #!/bin/bash in the starting of bash script? Can we write a bash script without #!/bin/bash ?

1 Answers1

5

This line is called shebang. It’s a ‚magic‘ line telling the program loader (kernel) how to execute a script on unixoid systems.

Cf. https://en.m.wikipedia.org/wiki/Shebang_(Unix)

MrTux
  • 30,335
  • 25
  • 102
  • 137