I'm sort of confused of login shells and interactive shells.
If I run
ssh my_remote_server 'echo $HOME'
I can get
/home/shawk
But when I run
ssh my_remote_server 'echo $ANOTHER_VAR'
I got a blank line.
export ANOTHER_VAR=$HOME/tr
is set in both ~/.bashrc
and ~/.profile
on my_remote_server
. So the question is, where should I set this variable? my_remote_server
runs Ubuntu 12.04 btw.
.bashrc
or the one on the server you are connecting to?$ANOTHER_VAR=$HOME/tr
in your.bashrc
orANOTHER_VAR=$HOME/tr
?