Change the current directory from a Bash script

Is it possible to change current directory from a script?

I want to create a utility for directory navigation in Bash. I have created a test script that looks like the following:

#!/bin/bash
cd /home/artemb

When I execute the script from the Bash shell the current directory doesn’t change. Is it possible at all to change the current shell directory from a script?

17 Answers
17

Leave a Comment