Ok, I hope this question makes some sense but what is the difference between a bash shell and a bash terminal? Example. When I first open up terminal I have a prompt with my current dir and my user name. In the terminal window header it says -bash- , when I type echo $SHELL I get bash. So by default the shell is bash. Where my confusion comes into play is when I type bash. My prompt then goes to bash-3.2$.Obviously it’s a different mode. Are ther any major differences? I have read the man page with no answer. I understand what a bash shell is but just do not get the difference. Thanks for the clarity in advance.
Share
There is no difference, they are both instances of the
bashshell.The reason you are seeing a different prompt is that your initial login shell sources
~/.bash_profilewhere presumably you have your prompt set. When you typebashit invokes another shell but because this one isn’t a login shell, it doesn’t source~/.bash_profileand so you get the default prompt.If you were call
bash -l, (which invokes bash as if it were a login shell) I bet you would see that your original prompt remains