Set the Environment
export, env, source — configure environment variables for an application.
A beginner Linux challenge worth 3 points. Solve it hands-on in a real Linux environment in your browser - no local setup, no fake shells.
The Challenge
Scenario: The app server refuses to start. The startup log says "Required environment variables not set."
Your tasks:
- Export the following variables in the current shell:
APP_ENV=productionDB_HOST=db-prod-01.internalAPI_KEY=sk-prod-abc123
- Add
export APP_ENV=productionpermanently to ~/.bashrc - Source ~/.bashrc to apply changes
- Write the value of $APP_ENV to /tmp/env_answer.txt
Commands to learn: export, env, printenv, source, echo $VAR
Run check when done.