# Weird Sys.which() function

**URL:** <https://discourse.julialang.org/t/weird-sys-which-function/58070>\
**Category:** General Usage\
**Tags:** ijulia\
**Created:** [March 27, 2021, 10:31am UTC](https://discourse.julialang.org/t/weird-sys-which-function/58070 "2021-03-27T10:31:15Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [March 27, 2021, 12:22pm UTC](https://discourse.julialang.org/t/weird-sys-which-function/58070/2 "2021-03-27T12:22:13Z")

</div>

> [@j2b2](#):
>
> The lesson of this story is that the julia function `Sys.which()` should not return another path than the (very useful) linux command `which` .

But the very useful linux command `which` may or may not be available on all platforms: [Search path for executable](https://discourse.julialang.org/t/search-path-for-executable/3511). `Sys.which` is meant to be a platform-independent alternative, otherwise one can just do `run(`which`)`.

That said, not using `realpath` is probably reasonable. Do you mind opening a pull request to fix that?

---

_[View the full topic](https://discourse.julialang.org/t/weird-sys-which-function/58070)._
