# How to open Julia Pro in Ubuntu?

**URL:** <https://discourse.julialang.org/t/how-to-open-julia-pro-in-ubuntu/54893>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [February 9, 2021, 4:35am UTC](https://discourse.julialang.org/t/how-to-open-julia-pro-in-ubuntu/54893 "2021-02-09T04:35:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![WouterJRV](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wouterjrv/32/21837_2.png) [@WouterJRV](https://discourse.julialang.org/u/WouterJRV)\
**Post date:** [February 9, 2021, 4:35am UTC](https://discourse.julialang.org/t/how-to-open-julia-pro-in-ubuntu/54893/1 "2021-02-09T04:35:08Z")

</div>

Dear all,

I recently started working with Julia from an Ubuntu 20.04 pc (I’m also rather new to linux). I have installed Juliapro, and like working with the Juno GUI.

However, it seems that I can only open it by manually moving to the file where it is installed, open it, and then load the .jl files of interest.  
For matlab, the default behavior is similar, but there exists an additional ‘application’ with the same name that  
\*opens the software from whatever directory when just typing “matlab”  
\*allows for opening .m files automatically with matlab from Files  
(see [Defautl to open \*.m files in MATLAB, linux - MATLAB Answers - MATLAB Central](https://nl.mathworks.com/matlabcentral/answers/565784-defautl-to-open-m-files-in-matlab-linux))

Is there a similar possibility with Julia?

for the first issue, I now managed to put a symbolic link “./Juno” in my home directory as a workaround, but that’s not a very flexible approach

---

<div class="post-metadata">

**Author:** ![pixel27](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pixel27/32/8902_2.png) [@pixel27](https://discourse.julialang.org/u/pixel27)\
**Post date:** [February 10, 2021, 3:35am UTC](https://discourse.julialang.org/t/how-to-open-julia-pro-in-ubuntu/54893/2 "2021-02-10T03:35:59Z")

</div>

I’m not 100% on what you are trying to do. I also don’t use JuilaPro, so I’m not sure how JuliaPro is different than Julia from a running perspective.

First if you open a standard Ubuntu Terminal can you just type `julia` to start up Julia? If that works, then you can `cd` to the directory of your Julia files and run:

```julia
julia program.jl

```

That will start Julia and run your program. If you want something simplier you could create a script (maybe in your home directory or create a bin directory under home) called `program.sh` with the contents:

```julia
#!/bin/bash
julia ~/path/to/julia/file/program.jl

```

Run “`chmod +x program.sh`” to mark it as executable, then you should be able to run it by doing:

```julia
./program.sh

```

From that directory. If you need the current directory to be the directory the julia file is in, then this script will probably be better::

```julia
#!/bin/bash
cd ~/path/to/julia/file/
julia program.jl

```

One gotcha is if your program does most of it’s work in an @async block and if you don’t wait for that block Julia will exit when it hits the end of program.jl. Basically something like:

```julia
@async begin
    x = 1
    for i = 1:1_000_000
        x = x + i
    end
    println("Result: $x")
end

```

Might exit before the println is reached. You would need to do:

```julia
task = @async begin
    x = 1
    for i = 1:1_000_000
        x = x + i
    end
    println("Result: $x")
end
wait(task)

```

This will ensure it waits for the task to end.

---

<div class="post-metadata">

**Author:** ![WouterJRV](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wouterjrv/32/21837_2.png) [@WouterJRV](https://discourse.julialang.org/u/WouterJRV)\
**Post date:** [February 11, 2021, 6:45am UTC](https://discourse.julialang.org/t/how-to-open-julia-pro-in-ubuntu/54893/3 "2021-02-11T06:45:17Z")

</div>

Thanks for your answer

actually, julia doesn’t start when I just type `julia`  
When I do that, I am suggested to install it with `sudo apt install julia` , but I’m worried that that will interfere with my JuliaPro installation

---

<div class="post-metadata">

**Author:** ![danielw2904](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/danielw2904/32/10890_2.png) [@danielw2904](https://discourse.julialang.org/u/danielw2904)\
**Post date:** [February 11, 2021, 7:19am UTC](https://discourse.julialang.org/t/how-to-open-julia-pro-in-ubuntu/54893/4 "2021-02-11T07:19:14Z")

</div>

Likely julia is not in your PATH (the environment variable that tells ubuntu where to look for programs when you enter a name). I think the recommended way is to create a symbolic link for julia in `/usr/local/bin`. Eg I have the julia tar unpacked in `~/Apps/julia-VERSION` and then do something like  
`sudo ln -s ~/Apps/julia-VERSION/bin/julia /usr/local/bin/julia`

---

<div class="post-metadata">

**Author:** ![WouterJRV](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wouterjrv/32/21837_2.png) [@WouterJRV](https://discourse.julialang.org/u/WouterJRV)\
**Post date:** [February 11, 2021, 7:35am UTC](https://discourse.julialang.org/t/how-to-open-julia-pro-in-ubuntu/54893/5 "2021-02-11T07:35:49Z")

</div>

This has worked, thanks!
