# How to add a Julia path to my Terminal environment?

**URL:** <https://discourse.julialang.org/t/how-to-add-a-julia-path-to-my-terminal-environment/70477>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [October 27, 2021, 12:29pm UTC](https://discourse.julialang.org/t/how-to-add-a-julia-path-to-my-terminal-environment/70477 "2021-10-27T12:29:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![leon](https://avatars.discourse-cdn.com/v4/letter/l/dc4da7/32.png) [@leon](https://discourse.julialang.org/u/leon)\
**Post date:** [October 27, 2021, 12:29pm UTC](https://discourse.julialang.org/t/how-to-add-a-julia-path-to-my-terminal-environment/70477/1 "2021-10-27T12:29:32Z")

</div>

I just reinstalled my Mac OS and Julia 1.7. I’m trying to add the path to Julia to my terminal.

Below is the instructions I found:

Copy and paste these two commands into your [shell](https://superuser.com/questions/144666/what-is-the-difference-between-shell-console-and-terminal):

```julia
rm -f /usr/local/bin/julia
ln -s /Applications/Julia-1.7.app/Contents/Resources/julia/bin/julia /usr/local/bin/julia

```

I got the below error:  
`ln: /usr/local/bin/julia: No such file or directory`

---

<div class="post-metadata">

**Author:** ![leon](https://avatars.discourse-cdn.com/v4/letter/l/dc4da7/32.png) [@leon](https://discourse.julialang.org/u/leon)\
**Post date:** [October 27, 2021, 12:37pm UTC](https://discourse.julialang.org/t/how-to-add-a-julia-path-to-my-terminal-environment/70477/2 "2021-10-27T12:37:10Z")

</div>

Found an answer myself. I’ll keep this question for future reference purposes.

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

```

---

<div class="post-metadata">

**Author:** ![leon](https://avatars.discourse-cdn.com/v4/letter/l/dc4da7/32.png) [@leon](https://discourse.julialang.org/u/leon)\
**Post date:** [October 27, 2021, 6:35pm UTC](https://discourse.julialang.org/t/how-to-add-a-julia-path-to-my-terminal-environment/70477/3 "2021-10-27T18:35:41Z")

</div>

I just realize that for my above solution, I would need to type it every time before I launch Julia. What is a permanent solution?

I tried to add the below to my .profile file but it did not work:  
`export JULIA_HOME = /Applications/Julia-1.7.app`

Many thanks!

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [October 27, 2021, 6:48pm UTC](https://discourse.julialang.org/t/how-to-add-a-julia-path-to-my-terminal-environment/70477/4 "2021-10-27T18:48:43Z")

</div>

> [@leon](#):
>
> I just realize that for my above solution, I would need to type it every time before I launch Julia. What is a permanent solution?

You would need to update the `PATH` in your shell profile.

For the `ln -s` approach, you might need to create the `/usr/local/bin` directory first, and you might need to use `sudo` (which requests that you enter your password):

```sh
sudo mkdir -p /usr/local/bin
sudo ln -s /Applications/Julia-1.7.app/Contents/Resources/julia/bin/julia /usr/local/bin/julia

```

---

<div class="post-metadata">

**Author:** ![leon](https://avatars.discourse-cdn.com/v4/letter/l/dc4da7/32.png) [@leon](https://discourse.julialang.org/u/leon)\
**Post date:** [October 27, 2021, 6:59pm UTC](https://discourse.julialang.org/t/how-to-add-a-julia-path-to-my-terminal-environment/70477/5 "2021-10-27T18:59:28Z")

</div>

Many thanks! This works great.

> [@stevengj](#):
>
> `sudo ln -s /Applications/Julia-1.7.app/Contents/Resources/julia/bin/julia /usr/local/bin/julia`
