There is a slider on the right of the posts, which shows (approximately) which post is on view, and a time-bar of the postings. The post by @MadeInGermany which I refer to is 4/19 (fourth of 19).
The terminal is just the display mechanism in the command line window. The shell is the interpreter for the commands you type into the terminal. The process tree command below shows I have a Mate terminal process, with one bash running the pipeline that makes the output, another bash in a different terminal that is idle, and three other stubs (which I don't understand).
$ pstree -p $PPID | cat
mate-terminal(15283)-+-bash(15290)-+-cat(15433)
| `-pstree(15432)
|-bash(15342)
|-{mate-terminal}(15286)
|-{mate-terminal}(15288)
`-{mate-terminal}(15289)
By "which shell", we mean one of bash, ksh, dash, csh, tcsh, and a few others.
Normally, echo $0
will show the shell you are currently have running in your terminal.
Most shells will tell you their version number, with a -v
or --version
option. Note this tells you the version of the shell you ask, which is not necessarily the shell you are running.
Unless you specifically run a different shell, your terminal is running the shell specified for your user in the /etc/passwd
file.
If you run a script that has a shebang like #! /bin/bash
, the script gets run by that shell, but that does not alter the shell running in the terminal.
$ echo $0
bash
$ bash --version
GNU bash, version 4.4.20(1)-release (x86_64-pc-linux-gnu)
(( Some licensing information ))
$ ksh --version
version sh (AT&T Research) 93u+ 2012-08-01
$ #.. My sh is a link to dash, and I do not have csh or tcsh ..#
$ grep paul /etc/passwd
paul:x:1000:1000:Paul Stillman,,,:/home/paul:/bin/bash
$ ksh
$ echo $0
ksh
$ pstree -p $$
ksh(15362)───pstree(15383)
$ #.. I ended that ksh with Ctrl-D, so I am back in my login bash shell ..#
$ echo $0
bash
$ pstree -p $$
bash(15322)───pstree(15384)
$