Search code examples
linuxbashfedora

/usr/bin/env: ‘bash’: No such file or directory


I am using Fedora Linux. I am trying to run a docker image and this error came up. Can someone help on how to fix it? (Resetting my bashrc file didn't help nor did other quick fixes suggested here).

bash -version
GNU bash, version 5.1.16(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

This gives no output:

$ exec "$@"

Solution

  • Try running it through #!/usr/bin/bash instead of #!/usr/bin/env bash. You can see the differences here.