Back to the learning path

export

export: export a variable to child processes Command details
Step 1/1: Export variables

NAME=value lives only in the current shell. export NAME=value makes it an environment variable that programs and scripts you run (child processes) can read too.

$ export APP_ENV=prod
Fundamentalsexport
Pass a variable to child processes
Set APP_ENV to eu-west and export it, then show with bash -c 'echo $APP_ENV' that a child process sees it.
syncNext lesson:unset