System Management
A Linux administrator opens a terminal and runs 'export PATH=$PATH:/opt/tools/bin' so that a custom utility can be run without typing its full path. The utility works in that session, but after the administrator logs out and back in, the shell reports 'command not found'. The change must apply to this user's future login sessions only. Which action BEST meets the requirement?
Show the answer
Correct answerC. Add the export line to the user's ~/.bash_profile file
Adding the export line to ~/.bash_profile makes the shell set PATH at each login for that user only. Editing /etc/environment is tempting, but it applies to all users and does not use shell syntax such as $PATH expansion or the export keyword.