This combines the answer by Serge with an unrelated answer by David. It changes the directory, and then instead of forcing a bash shell, it launches the user's default shelllaunches the user's default shell. It however requires both getent and /etc/passwd to detect the default shell.
#!/usr/bin/env bash cd desired/directory USER_SHELL=$(getent passwd <USER> | cut -d : -f 7) $USER_SHELL Of course this still has the same deficiency of creating a nested shell.