export Command Generator
Set or export shell environment variables (export NAME=value)
Getting Started with export
## What is export?
The `export` command sets an environment variable in the current shell **and** makes it available to child processes (programs launched from that shell). Without `export`, a variable stays local to the shell.
## How to Use
1. **Set the Name**: Enter the variable name (uppercase by convention, e.g., `JAVA_HOME`, `NODE_ENV`). 2. **Set the Value**: Enter the value (e.g., `/usr/lib/jvm/default-java`, `production`). 3. **Copy & Run**: Paste the generated command into your terminal. The variable is exported to the current shell and any process started from it.
Common Options
### `NAME=value` Assignment
Exported variables use the `NAME=value` form with no spaces around `=`: `export NODE_ENV=production`.
### Listing all exported variables
Run bare `export` (no arguments) to print every variable currently exported by the shell, in a reusable `declare -x` form.
### Inspecting a variable
Pass only a name to mark an already-set variable for export: `export PATH` exports the existing `PATH` without changing it. To read a value back, use `echo $NAME` or `printenv NAME`.
### Without a value
`export NAME` (no `=value`) promotes a previously assigned shell variable into the environment.
▶How do I make an exported variable permanent across sessions?
▶What is the difference between a shell variable and an exported variable?
▶How do I view all currently exported variables?
If this tool has been helpful to you, consider buying me a coffee.
Buy me a coffee