I installed samtools executables within my bin directory under home directory.
Installation works perfectly well. I am using Ubuntu 14.04 version and it has .profile
and .bashrc
in my home directory which looks like this which I asked in my previous post.
I want to add my /home/user/bin
directory permanently in my PATH
so that when I open the terminal, it automatically has samtools in the path. My .profile says to put /home/user/bin
in the path but it is not executable.
How can I do it?
I have to run it like this after opening the terminal
. .profile
which samtools
/home/user/bin/samtools
Hope to hear from you guys
Thanks
but the post says .bashrc is not the right place to set env variables. Why is that??
– user3138373 Aug 17 '15 at 17:33.profile
it will be available to your complete desktop session'. Bash specific, I think the rc file is for the interactive bits, and theprofile
is for setting run time bits such as the path - see also: http://stefaanlippens.net/bashrc_and_others . This mostly explained inman bash
– Wilf Aug 17 '15 at 18:24~/.profile
adds~/bin
to PATH automatically if it exists. You don't need to do anything. – Gunnar Hjalmarsson Aug 17 '15 at 19:29~/bin
named samtools, you can run it from anywhere by the commandsamtools
. – Gunnar Hjalmarsson Aug 17 '15 at 20:10~/bin
folder. – Gunnar Hjalmarsson Aug 17 '15 at 20:27set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH" fi So i just made a bin folder in my home directory and place my executables in that bin folder. closed the terminal , opened them again; typed which samtools and nothing is showed. If I do . .profile, then which samtools work. HELP!!
– user3138373 Aug 17 '15 at 21:23