How can I set the current working directory to the directory of the script in Bash? September 8, 2022 by Tarik #!/bin/bash cd "$(dirname "$0")"