0

I am trying to solve “how to add path permanently” using ubuntu 14.04. If I had a program say samtools-1.2 that I wanted to add to path I think I would do:

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

Then to verify:

cat ~/.bashrc
Giacomo1968
  • 58,727
justaguy
  • 229

1 Answers1

0

To accomplish this you will want to create a new file in /etc/profiles.d/ with which ever name you want but making sure it ends with .sh for example... samtools.sh then inside the file place the following:

#!/bin/sh
export PATH=$PATH:/home/cmccabe/Desktop/NGS/samtools-1.2

Afterwards you'll want to run source /etc/profile via command line.

Note: export PATH=$PATH:home/cmccabe/Desktop/NGS/samtools-1.2 is missing a slash after the : character.

Fred
  • 116