I have installed samtools under my folder of choice. Also there is another different version of samtools present in /usr/local/bin/samtools I installed under my choice of folder latest version of samtools.

When I use which samtools I get


How can I permanently use only that release of samtools which I have installed? Do I need to delete /usr/local/bin/samtools and then use export PATH=$PATH:/path/to/my/folder


1 Answer 1


There is no need to delete /usr/local/bin/samtools. If you add /path/to/your/folder so that it precedes /usr/local/bin/samtools, it will take precedence and will show up when issuing the which samtools command.

export PATH=/path/to/your/folder:$PATH

This will preserve the original samtools which can still be called by absolute path, if necessary.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .