# How to get the julia executable from within Julia?

**URL:** <https://discourse.julialang.org/t/how-to-get-the-julia-executable-from-within-julia/15327>\
**Category:** General Usage\
**Created:** [September 22, 2018, 4:22am UTC](https://discourse.julialang.org/t/how-to-get-the-julia-executable-from-within-julia/15327 "2018-09-22T04:22:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohamed82008](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed82008/32/18171_2.png) [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Post date:** [September 22, 2018, 4:22am UTC](https://discourse.julialang.org/t/how-to-get-the-julia-executable-from-within-julia/15327/1 "2018-09-22T04:22:29Z")

</div>

Hi, how can I get the currently running Julia executable file path from within the Julia instance?

---

<div class="post-metadata">

**Author:** ![JonasIsensee](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jonasisensee/32/4704_2.png) [@JonasIsensee](https://discourse.julialang.org/u/JonasIsensee)\
**Post date:** [September 22, 2018, 6:40am UTC](https://discourse.julialang.org/t/how-to-get-the-julia-executable-from-within-julia/15327/2 "2018-09-22T06:40:31Z")

</div>

This  
`joinpath(Sys.BINDIR, Base.julia_exename())`  
works for me.

(Credit goes to v0.7 compatible branch of `PkgBenchmarks` , @fredrikekre )

---

<div class="post-metadata">

**Author:** ![mohamed82008](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mohamed82008/32/18171_2.png) [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Post date:** [September 22, 2018, 6:41am UTC](https://discourse.julialang.org/t/how-to-get-the-julia-executable-from-within-julia/15327/3 "2018-09-22T06:41:27Z")

</div>

Awesome, thanks!
