Environment Variables in Shell

Level 249 keystrokes

export sets environment variables available to child processes.

Shell code

# Sets NODE_ENV and exports it, so programs started from this shell see it
# Without export the variable would stay local to the current shell
1export NODE_ENV=production
# Prints: Mode: production
2echo "Mode: $NODE_ENV"

Output

Mode: production
Practice typing this code

Practice typing this code. Results are not recorded in the rankings.

Symbols in this code

The symbols you type in this Shell code and how often they appear.

  • _× 2
  • "× 2
  • :× 1
  • =× 1
  • $× 1

More Shell examples at level 2

← Shell typing practice