|
Linux shells
When you login to a Linux system, you get a command shell.
Shells are listed in /etc/shells. Default Linux shell: bash
System commands, scripts and applications run in the shell -
they become child processes of the shell.
Shell variables are local to the shell.
A shell variable becomes an environment variable after
executing command export on it:
Environment variables are inherited by the child shells and processes.
Commands executed in the shell should be either built-in shell
commands, or addressed with the full path, or located in the
PATH env. variable.
Exercise
Create a new shell variable, svar:
Start a new child shell and see if svar is defined there:
Exit from the child shell, export the variable, and see if it is
defined in a child shell:
|
|