# Portable Julia

**URL:** <https://discourse.julialang.org/t/portable-julia/45339>\
**Category:** General Usage\
**Created:** [August 21, 2020, 9:50pm UTC](https://discourse.julialang.org/t/portable-julia/45339 "2020-08-21T21:50:35Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Post date:** [August 22, 2020, 12:06am UTC](https://discourse.julialang.org/t/portable-julia/45339/5 "2020-08-22T00:06:05Z")

</div>

In case this applies to your situation: I use the git bash. Here is my bash script to set up the portable Julia:

```julia
#
set -o errexit 
set -o nounset

# Make sure we are in the folder in which the portable Julia is installed.
MyPortableJulia=julia-1.5.0
if [! -d $(pwd)/$MyPortableJulia] ; then
    echo "Need to be in the folder with the portable Julia, $MyPortableJulia"
    exit 1
fi

# Locate the Julia depot in the current folder.
export MyDepot=$(pwd)/.$MyPortableJulia-depot
if [! -d $MyDepot] ; then
    mkdir $MyDepot
fi
export JULIA_DEPOT_PATH=$MyDepot

# Make sure we can start Julia just by referring to the program name.
export PATH=$(pwd)/$MyPortableJulia/bin:$PATH

# Bring up the Julia prompt.
echo JULIA_DEPOT_PATH=$MyDepot
julia

```

A newer version, which starts VS code, looks like this:

```julia
#
set -o errexit 
set -o nounset

# Make sure we are in the folder in which the portable Julia is installed.
MyPortableJulia=julia-1.5.0
if [! -d $(pwd)/$MyPortableJulia] ; then
    echo "Need to be in the folder with the portable Julia, $MyPortableJulia"
    exit 1
fi

# Locate the Julia depot in the current folder.
export MyDepot=$(pwd)/.$MyPortableJulia-depot
if [! -d $MyDepot] ; then
    mkdir $MyDepot
fi
export JULIA_DEPOT_PATH=$MyDepot

# Make sure we can start Julia just by referring to the program name.
export PATH=$(pwd)/$MyPortableJulia/bin:$PATH

VSCode-win32-x64-1.48.1/Code

```

This file can be executed in Windows 10 just by double-clicking it.

---

_[View the full topic](https://discourse.julialang.org/t/portable-julia/45339)._
