Installing Julia and the REPL workflow

Install with juliaup, learn the four REPL modes, run scripts and includes, and keep every project in its own environment.

Install

# juliaup manages versions and keeps them up to date
# macOS / Linux
curl -fsSL https://install.julialang.org | sh

# Windows (PowerShell)
winget install julia -s msstore

juliaup add 1.10          # install a specific release
juliaup status
julia --version

A Julia release is usually a minor version rather than a patch: packages frequently require 1.10 or newer, and the language has a documented compatibility policy across 1.x. Pin the version you develop against so two machines behave the same.

The REPL modes

PromptModeWhat it does
julia>JulianOrdinary Julia evaluation
help?>HelpDocumentation for the next name you type
pkg>Pkgadd, status, update, activate
shell>ShellSystem commands, like a normal terminal
julia> after ;Back to JulianReturn from any other mode
# in the REPL, press ] for pkg mode
#   (@v1.10) pkg> activate .
#   (myproject) pkg> add DataFrames CSV

# then from Julian mode
using DataFrames
?DataFrame            # the help prompt, also available as a function
varinfo()             # what is currently defined in Main

Press ? for help, ] for the package manager and ; for the shell, then backspace to return. These three keys save more time than any editor plugin.

Scripts, include and environments

julia script.jl                 # run a file, then exit
julia --project=. script.jl     # run with the environment in the current folder
julia -e 'println(1 + 1)'       # evaluate one expression
julia --project=. -i script.jl  # run, then stay in the REPL
include("utils.jl")            # evaluate a file in the CURRENT module
using Pkg
Pkg.status()                  # what this environment has
Pkg.activate(".")             # switch to the environment of this project

@time sum(1:10_000_000)       # first call includes compilation time
💡
include is textual inclusion, not an import: the file's code lands in whatever module called it, and running it twice defines the same names twice. Real packages use module and using, which is what the next chapters build towards.

FAQ

Why does the first run of my script take so long?
Julia compiles the methods you call on first use. That latency is a one-off per session, not per call, and it is why a REPL feels slow at the start and fast afterwards. Package precompilation moves some of the cost to install time.
Should I install packages in the default environment?
No. The default environment is shared by every project on the machine, so a version conflict in one project breaks another. Activate a project directory and add there.

Syntax and the type system Modules and organising a Julia project

Last refreshed 2026-09-18.