Editors & ShellCLI Reference
$export
Set and export environment variables to child shell processes.
Syntax DefinitionPOSIX standard
export [NAME[=VALUE]...]Try `export` Live in Interactive Sandbox
Zero-install client simulation with real-time feedback.
bash — terminal
AST Sandbox (Free)
Overview & How export Works
`export` marks shell variables to be exported to the environment of subsequently executed child commands and subshells.
Common Flags & Command Options
| Flag / Option | Description |
|---|---|
| -p | Display a list of all exported variables in the current shell. |
Practical Real-World Examples
Example #1Export an environment variable
export NODE_ENV=production && echo $NODE_ENVSets NODE_ENV to production and verifies with echo.
Sample Output:
productionFrequently Asked Questions
How do you make exported variables permanent across reboots?
Add the `export VAR=value` statement to your `~/.bashrc` or `~/.profile` configuration file.
Related Linux Commands
$echoText Processing
Print text strings or write data to files using shell redirection.
$nanoEditors & Shell
Simple, user-friendly in-terminal text editor.
$vimEditors & Shell
Highly configurable, powerful modal text editor.
$cowsayEditors & Shell
Generate an ASCII art picture of a cow with a message speech bubble.
$figletEditors & Shell
Generate large text banners using ASCII art characters.