DELAPARRA
Index
Color
NL
Category: CLI commands

export

Explained by Updated

What is export?

export: Export — Set an environment variable so child processes inherit it. export makes a shell variable available to programs started from that shell. export APP_ENV=testing sets the variable for the current session and every command you run afterwards. Without export, a variable exists only in the shell itself. A PHP or Node process you start will not see it.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about export

What should you keep in mind with export?

Variables set this way disappear when you close the terminal. To keep them, add the line to your shell profile, such as ~/.bashrc or ~/.zshrc. For project settings, a .env file read by the application is usually the better choice, because it lives with the project instead of your personal shell. Avoid exporting secrets in your profile, where every program you run can read them.

At a glance

CategoryCLI commands
Explained by
Updated

More CLI commands terms

All terms starting with E

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.