What is the difference between “#!/usr/bin/env bash” and “#!/usr/bin/bash”?

In the header of a Bash script, what’s the difference between those two statements:

  1. #!/usr/bin/env bash

  2. #!/usr/bin/bash

When I consulted the env man page, I get this definition:

 env - run a program in a modified environment

What does it mean?

5 s
5

Leave a Comment