exam questions

Exam 010-160 All Questions

View all questions & answers for the 010-160 exam

Exam 010-160 topic 1 question 37 discussion

Actual exam question from LPI's 010-160
Question #: 37
Topic #: 1
[All 010-160 Questions]

Which of the following commands adds the directory /new/dir/ to the PATH environment variable?

  • A. $PATH=/new/dir: $PATH
  • B. PATH=/new/dir: PATH
  • C. export PATH=/new/dir: PATH
  • D. export $PATH=/new/dir: $PATH
  • E. export PATH=/new/dir: $PATH
Show Suggested Answer Hide Answer
Suggested Answer: E 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
WeinerFarts68
Highly Voted 1 year, 7 months ago
None of these are right. It should be like this. You want to set the PATH variable to the current path value, then append the : delimiter, followed by the new directory you're appending. export PATH=$PATH:/new/dir
upvoted 34 times
...
oe_albornoz
Highly Voted 1 year, 6 months ago
E is also correct, the only difference is that new/dir will be at the begining of the PATH variable
upvoted 12 times
...
HunterBiden
Most Recent 4 months, 2 weeks ago
Interesting
upvoted 1 times
...
Allan85
11 months ago
WeinerFarts68 is correct.
upvoted 4 times
...
sasquatchshrimp
1 year, 1 month ago
Yeah, E is correct as well as WeinerFarts68.
upvoted 4 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
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.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago