问题
I am running Julia on my university's cluster, which runs Red Hat Linux. The Julia download's path is
/gsfs0/data/heathjo/Downloads/julia-1.5.3/bin
When I run
/gsfs0/data/heathjo/Downloads/julia-1.5.3/bin/julia
Julia runs fine. However, I just want to type
julia
And have it run. I edited my .bashrc to include
alias julia="/gsfs0/data/heathjo/Downloads/julia-1.5.3/bin/julia"
Running "julia", I now get the prompt
CORRECT>.julia (y|n|e|a)?
Running both .julia and julia results in
julia: Command not found.
What am I doing wrong? I also get the same issue when I try to set my path in the .bashrc file.
EDIT1: For reference, here's my .bashrc file :
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
module load gcc
module load torque
alias julia="/gsfs0/data/heathjo/Downloads/julia-1.5.3/bin/julia"
EDIT2: Here is my bash_profile as well, where I have tried adding it to my path. For some reason, I get the same error:
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH="/gsfs0/data/heathjo/Downloads/julia-1.5.3/bin:$PATH"
export PATH
Ideally, I'd like to just add it to my path rather than make an alias, but for some reason nothing seems to be working.
来源:https://stackoverflow.com/questions/65533285/julia-alias-in-bashrc-not-working-correctly