export
ShellFundamentals In simulator In real LinuxSet an environment variable for child processes
Name: export: export a variable to child processes
You can practise it right away in the simulator, and use it in real Linux mode too.
Description
export is a shell builtin that marks variables for export, so every child process started afterwards inherits them. Unexported variables stay private to the current shell.
The effect lasts only for this shell and its children; put exports in ~/.bashrc or ~/.profile to apply them at every login.
Syntax
export NAME[=VALUE]...Common options
| -p | List all exported variables |
| -n | Remove the export property |
| -f | Export functions (child shells can use them) |