Reverse exec bash

exec bash -l

This will replace the current shell session with a bash shell started as a login shell. A login shell will read your .bash_profile (or .bash_login or .profile, whichever it finds first) and other files where your prompt may be defined.

With exec bash, you replaced the current shell session with an interactive shell. This will read .bashrc from your home directory. If you don't set your prompt there, then you will get the default bash prompt.

Without the exec, you would have been able to just exit to get back to your old shell session. With the exec, the old session is now gone.

You may also simply exit the shell and start a new one.

Tags:

Shell

Debian