What is a Linux subshell? A subshell is basically a new shell just to run a desired program. A subshell can access the global variables set by the ‘parent shell’ but not the local variables. Any changes made by a subshell to a global variable is not passed to the parent shell.
What is a subshell terminal? A subshell is a separate instance of the command processor — the shell that gives you the prompt at the console or in an xterm window. Just as your commands are interpreted at the command-line prompt, similarly does a script batch-process a list of commands.
What are the types of Linux shells?
|Shell||Complete path-name||Prompt for non root user|
|Bourne shell (sh)||/bin/sh and /sbin/sh||$|
|GNU Bourne-Again shell (bash)||/bin/bash||bash-VersionNumber$|
|C shell (csh)||/bin/csh||%|
|Korn shell (ksh)||/bin/ksh||$|
1 more row
What type of processing can be done using a subshell? Whenever you run a shell script, it creates a new process called subshell and your script will get executed using a subshell. A Subshell can be used to do parallel processing. We can make the variable known to subshells with export command.