justaguy
justaguy

Reputation: 3022

correct way to add to path in ubuntu 14.04

I added a binary to path using:

export PATH=/home/cmccabe/Desktop/NGS/samtools-1.2:$PATH

and I can see it if I:

echo $PATH

However I keep getting samtools command not found. So my question is it better to add to path like this:

echo 'export PATH=/home/cmccabe/Desktop/NGS/samtools-1.2:$PATH/' >> .bashrc

or is there a better way?

Upvotes: 2

Views: 427

Answers (1)

Alu
Alu

Reputation: 737

If you have root access you can edit /etc/environment for permanent change.

But i would use the .bashrc file to change the path variable only for the user.

And for the "not found" Problem. Look at the File permissions.

  • Is the file executable?
  • Do You have the right to execute the file?

Upvotes: 2

Related Questions