Question 420
In a controlled system change, the engineer encounters: An operator opens a second login shell and expects a nonexported function to persist. What is the most appropriate targeted action?
Explanation
Correct Answer
A new shell is not guaranteed to inherit functions and aliases from a previous process. The proposed change is specific to this fault. Confirm the result: The setting appears in the intended new session.
Incorrect Answers
That remedy is appropriate when a maintenance script overwrites a log although operators intended to append. It targets shell > truncates a file while >> appends standard output; here a new shell is not guaranteed to inherit functions and aliases from a previous process, so it does not directly repair the observed fault.
This change addresses a log parser misses errors written to stderr when stdout is redirected. The present problem is different: a new shell is not guaranteed to inherit functions and aliases from a previous process. Applying the alternative would leave the key cause unresolved.
That remedy is appropriate when a team wants every process to inherit a configuration variable from a login shell. It targets only exported shell variables enter the environment of child processes; here a new shell is not guaranteed to inherit functions and aliases from a previous process, so it does not directly repair the observed fault.





CompTIA Linux+ (XK0-006) Practice Tests