Question: Why did the default directory remain unchanged after the script executed? Answer: Because the script was executed in a new process. The current process (interactive shell session) "forked" a child process to execute the script, and waited until the child process finished. When that happened, the child process was "killed" and the current process resumed - with all of its original environment variables intact, including the current working directory.