Linux · Flashcard

Which command makes a shell variable available to programs started from that shell?

  • Aexport, which marks the variable for inheritance by child processes
  • Bdeclare, which removes the variable from the current shell session
  • Creadonly, which prints every variable currently held by the shell
  • Dunset, which copies the variable into the parent process memory

Why this is the answer

export promotes a variable into the environment so child processes inherit it. unset does the opposite — it deletes a variable rather than exporting it.

Official docs
Study in Gnoseed →