# Fail to run shell command

**URL:** <https://discourse.julialang.org/t/fail-to-run-shell-command/55543>\
**Category:** New to Julia\
**Created:** [February 18, 2021, 2:42pm UTC](https://discourse.julialang.org/t/fail-to-run-shell-command/55543 "2021-02-18T14:42:16Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![sijo](https://avatars.discourse-cdn.com/v4/letter/s/da6949/32.png) [@sijo](https://discourse.julialang.org/u/sijo)\
**Post date:** [February 18, 2021, 3:34pm UTC](https://discourse.julialang.org/t/fail-to-run-shell-command/55543/8 "2021-02-18T15:34:56Z")

</div>

> [@Philippe\_Maincon1](#):
>
> So this means my first attempt sends a command to another shell, while yours sends a command to the same shell I opened?

Not really: Julia doesn’t use a shell to run a program. It just runs the program directly.

With

```julia
run(`echo hello`)

```

you ask Julia to execute the program `echo` (Windows will look for `echo.exe`, `echo.com`, etc.) with argument `hello`. This program exists on Linux but not on Windows.

With

```julia
run(`cmd /k echo hello`)

```

you ask Julia to execute the program `cmd` with arguments `/k`, `echo` and `hello`. The program `cmd.exe` is actually a shell so that will execute a shell 🙂

---

_[View the full topic](https://discourse.julialang.org/t/fail-to-run-shell-command/55543)._
