15

I am trying to install Anaconda on my Linux machine. Right or wrong, at the end of the instructions they say to

add this line to the file .bashrc in your home directory: export PATH="/home/username/anaconda/bin:$PATH"

I do not know much of how the PATH in bash works. But, I have another PATH in my .bashrc file:

export PATH="/usr/local/share/rsi/idl/bin:$PATH"

How am I supposed to add the new path?

Py-ser
  • 359

3 Answers3

16

This should be it (all paths wanted in ${PATH} separated by colons) :

export PATH="/usr/local/share/rsi/idl/bin:/home/username/anaconda/bin:$PATH"
Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255
gerhard d.
  • 2,188
3

One option is to just add the line, so that you have two lines changing the path:

export PATH="/home/username/anaconda/bin:$PATH"
export PATH="/usr/local/share/rsi/idl/bin:$PATH"    

The other option is to just change the existing line to this:

export PATH="/home/username/anaconda/bin:/usr/local/share/rsi/idl/bin:$PATH"
daniel kullmann
  • 9,527
  • 11
  • 39
  • 46
2

You can do multiple path export, In single line,

export PATH=${PATH}:/first/path:/second/path:/third/path

Multiple paths as

export PATH="A"
export PATH="B:$PATH"
export PATH="C:$PATH"
KKD
  • 620