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.
No. A terminal is a text input and output environment. A physical terminal is referred to as a console. The shell is a command-line interpreter.
The Shell is the name of the program that runs in the terminal (command line interpreter). It can be also seen as a program that processes commands and returns output because it is like an application running commands.
Bash scripting is a subset of shell scripting. Shell scripting is a method to automate tasks as a collection of commands. The bash script is one form of shell script. Shells may be one of Korn, C shell, Bourne, Bash, etc.
It is named a shell because it is the outermost layer around the operating system.
There is no difference, they are both instances of the bash
shell.
The reason you are seeing a different prompt is that your initial login shell sources ~/.bash_profile
where presumably you have your prompt set. When you type bash
it invokes another shell but because this one isn't a login shell, it doesn't source ~/.bash_profile
and 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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With