Let's say, i opened a terminal and entered/executed some shell commands.
But i didnt invoke explicitly bash or any other shell.
What shell was used by default?
|
Let's say, i opened a terminal and entered/executed some shell commands. But i didnt invoke explicitly bash or any other shell. What shell was used by default? |
||||
|
|
|
The one specified on your line in For example mine:
Here it is /bin/bash (the Ubuntu default) You can also use
This is telling me my shell is /bin/bash and letting me change it. Finally,
|
|||||||||||||
|
|
GNU Bash is the shell used by default in terminals on Ubuntu. However when scripts are executed on system boot then dash is used, as it is dash that is /bin/sh. This is defined in the $SHELL environmental variable. You can check by typing |
||||
|
|
typing the following will display what shell the terminal opened with:
However, to find out what shell you are currently in (you may have changed it) type
e.g. you will see that the shell is bash in the example output
Another method is to use
this will simply return the name of the current shell. |
|||
|
|