Question 10
The engineer proposes this implementation: Use export VAR=value or export an existing VAR before starting the child process. The requirement is: A developer defines a variable that a child process must read after Bash launches it. Which technical explanation best supports the proposed action?
Explanation
Correct Answer
An ordinary shell variable is local; export places its value into the environment inherited by child processes. It specifically supports the proposed action of Use export VAR=value or export an existing VAR before starting the child process. for the requirement described.
Incorrect Answers
This explains another Linux operation, namely Define the deploy function in ~/.bashrc and reload the interactive shell., where Shell functions stored only in the current process do not persist after exit unless startup files define them again. It does not explain why Use export VAR=value or export an existing VAR before starting the child process. satisfies the stated condition.
This explains another Linux operation, namely Put the alias definition in that user's ~/.bashrc and start a new interactive Bash shell., where Bash interactive startup uses the per-user bashrc; aliases are shell parsing shortcuts rather than exported environment variables. It does not explain why Use export VAR=value or export an existing VAR before starting the child process. satisfies the stated condition.
This explains another Linux operation, namely Run unset VARIABLE to remove the shell parameter and its exported value., where unset removes a named shell variable, so subsequent children no longer inherit it. It does not explain why Use export VAR=value or export an existing VAR before starting the child process. satisfies the stated condition.






LPI Level 1 (102-500) Practice Tests