0

I'm in trouble adding a different PATH. When I add it like that :

export PATH=$PATH:/opt/file/base/bin/linux-x86_64

It works fine for the current terminal. But when I close it and open again, it doesn't work.Each time I want to use commands in that directory,I have to export PATH.

Is there any way to do that ? I don't want to export it each time.

Thanks in advance.. Best Regards..

Rinzwind
  • 299,756
Forty
  • 43

1 Answers1

1

You can do one of two solutions:

  1. Edit your PATH variable in /etc/environment and add the :/opt/file/base/bin/linux-x86_64 to the end of it. (this builds the PATH statically, meaning that whatever shows up here is the "base" for the PATH variable, and any additions, like in the profile, will be added to this)
  2. Edit your bash profile in /etc/profile and append to it export PATH=$PATH:/opt/file/base/bin/linux-x86_64 (this build the PATH dynamically)