I wrote a small Julia program:

println("Hello world!")

I can run Julia from the Terminal:

$ /Applications/Julia-0.6.app/Contents/Resources/julia/bin/julia test.jl 
Hello world!

To make my life easier, I tried to create a symbolic link to the julia file. However, it doesn't seem to work!

$ sudo ln -s /Applications/Julia-0.6.app/Contents/Resources/bin/julia /usr/local/bin/julia
$ julia
-bash: julia: command not found
$ type -a julia
-bash: type: julia: not found

How do I get my symbolic link to work properly?

What is confusing for me is that /usr/local/bin/ is in my PATH:

$ echo $PATH
  • What does the output of type -a julia says? – Nimesh Neema Aug 14 '18 at 11:50

I figured out what went wrong: I made a typographical mistake when I was creating the symbolic link!


sudo ln -s /Applications/Julia-0.6.app/Contents/Resources/bin/julia /usr/local/bin/julia


sudo ln -s /Applications/Julia-0.6.app/Contents/Resources/julia/bin/julia /usr/local/bin/julia

(I was missing the julia in .../Resources/julia/bin/...)

| improve this answer | |
  • 1
    Then the title of this question should be "Are my glasses on?" which is a question I should ask myself because I didn't see it either 😊. – dan Aug 14 '18 at 14:21

It's a better idea to add the folder that contains the binary to your $PATH instead of creating a link to the file inside /usr/local/bin.

export PATH="${PATH}:/Applications/Julia-0.6.app/Contents/Resources/julia/bin"

This way, you don't need to create invidual links for every single file inside the bin folder if you ever want to use them.

You can also add this line to ~/.bash_profile for it to persist after you close the terminal.

| improve this answer | |

You must log in to answer this question.

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