Exam 010-160 Topic 2 Question 37 Discussion

Actual exam question for Lpi's 010-160 exam
Question #: 37
Topic #: 2
Which of the following commands adds the directory /new/dir/ to the PATH environment variable?

Suggested Answer: C Vote an answer

The PATH environment variable is a colon-separated list of directories that the shell searches for commands. To add a new directory to the PATH, you need to append it to the existing value of the variable, using the syntax PATH=new/dir:PATH. However, this only changes the PATH for the current shell session. To make the change permanent, you need to use the export command, which makes the variable available to all child processes of the shell. The export command takes the name of the variable as an argument, without the dollar sign ($). Therefore, the correct command to add /new/dir/ to the PATH and export it is export PATH=/new/dir:PATH. Reference:
Linux Essentials - Linux Professional Institute (LPI)
How to set the path and environment variables in Windows - Computer Hope

by djiwfzilvjpgryatdd at May 11, 2026, 06:46 AM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
djiwfzilvjpgryatdd
2026-05-11 06:46:08
Selected Answer: E
Needs to refrence the $PATH at the end
upvoted 1 times
...
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

0
0
0
10