Tag Archives: change to script directory

Linux: Change working directory to script directory in bash

Hi,

short post. You start a bash script and want to change the working directory to the directory where the script is stored

Use this:

cd "$(dirname "$0")"

Michael