Reputation:
I was in need of setting a PATH in terminal. I tried ;
export PATH=/usr/local/sample
it seems ok. but after that I lost another paths i set previously. What is the issue?
Upvotes: 1
Views: 1069
Reputation:
You should add PATH like this :
export PATH=/usr/local/sample/:$PATH
appending $PATH will add the current values set in the PATH.
Upvotes: 2
Reputation: 635
Do it like this: export PATH=$PATH:/usr/local/sample
You assigned PATH a new value (PATH = VALUE
). What you wanted was to add a new value to PATH (PATH = PATH + VALUE
).
Upvotes: 1