-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

6

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
  • 32,350
  • 30
  • 109
  • 146