exec bash should replace the current shell process with (a new instance of) bash.
EDIT: Seems from answers below that Catalina replaces bash with zsh. You can run
exec zsh in that case, or alternatively
exec "$SHELL" which should always use your default shell.
exec $SHELL if you want the start the same shell you’re in.
The accepted answer will only work for you if you’re using bash.
The accepted answer is great for a shell that’s using bash, which is also what the OP asked, however, I’m using Terminal on macOS with a non-default shell (zsh) and running the command
exec bash obviously doesn’t have the desired effect: it launches bash instead of my default shell.
So the environment-agnostic command would be
exec $SHELL which utilizes the environment variable
$SHELL that stores the default shell for the user.
Also, note that Apple replaced bash with zsh in macOS Catalina so to have the effect the OP is looking for running either
exec zsh or
exec $SHELL is the way to go after updating to macOS 10.15.
According to this article and others your shell doesn’t change when you upgrade to Catalina. But any new accounts will be
zsh. You can change those to
bash if desired.
bash will not be part of macOS at some time in the future. Apparently the licensing for
zsh is less restrictive.
I came upon this article after getting tired of quitting and restarting iTerm for the same reason as the OP knowing there was a command such as