100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace
Programming

Installing Julia and the REPL

How to install Julia with juliaup and navigate the four modes of Julia's interactive REPL for fast, iterative development.

FoundationsBeginner8 min readJul 10, 2026
Analogies

Installing Julia

The recommended way to install Julia today is juliaup, the official cross-platform version manager: running its installer (curl -fsSL https://install.julialang.org | sh on macOS/Linux, or an equivalent command on Windows) puts a juliaup and julia command on your PATH and lets you install, switch between, and update multiple Julia versions side by side, similar in spirit to how nvm manages Node.js versions or rustup manages Rust toolchains. Package-manager installs (apt, Homebrew) or manual tarball downloads still work, but juliaup is preferred because Julia's release cadence means projects often pin to a specific minor version, and juliaup makes julia +1.10 or julia +lts trivial to select.

🏏

Cricket analogy: It's like the ICC maintaining an official, versioned rulebook (T20, ODI, Test) that any ground can switch between for the match format being played — juliaup lets you switch between Julia versions (1.9, 1.10, LTS) the same way a curator selects the right format's rules.

The Julia REPL and Its Modes

Launching julia from a terminal drops you into the REPL (read-eval-print loop) with a julia> prompt where expressions are evaluated immediately and their results printed. The REPL has four built-in modes: the default Julian mode for evaluating Julia code; help mode, entered by typing ?, which turns the prompt into help?> for looking up documentation on any function or type; package mode, entered with ], which turns the prompt into (env) pkg> for installing and managing packages; and shell mode, entered with ;, which turns the prompt into shell> for running operating-system commands without leaving Julia.

🏏

Cricket analogy: It's like a broadcast switching between the live feed, a Hawk-Eye replay overlay, and a pitch-map graphic at the press of a button — the Julia REPL switches between Julian, help, package, and shell modes the same way, each a different 'view' of the same session.

You exit any special mode and return to the default julia> prompt by pressing Backspace on an empty line; typing Ctrl+D on an empty Julian prompt exits the REPL entirely. Because restarting Julia means re-paying the JIT compilation cost for everything you've loaded, most Julia developers install the Revise.jl package and load it at REPL startup, so that edits to a source file on disk are automatically picked up in the running session without restarting — turning what would otherwise be a slow edit-restart-recompile cycle into fast, incremental iteration.

🏏

Cricket analogy: It's like a batsman staying at the crease between overs rather than walking off and re-padding up each time — Revise.jl keeps your REPL session 'at the crease,' picking up code edits without making you restart and recompile everything.

Running Scripts vs. Interactive Work

To run a whole file non-interactively, use julia myscript.jl from the terminal (optionally passing command-line arguments, which land in the ARGS array inside the script); this is what you'd use in a cron job or a CI pipeline. Add --project=. (or --project=@. to search upward for the nearest Project.toml) so Julia uses that directory's own package environment instead of the global default one — a habit worth building early, since forgetting --project is a common source of 'works on my machine but not for my collaborator' bugs.

🏏

Cricket analogy: It's like the difference between a nets session (REPL — experiment freely) and a scheduled ODI (running a script — a fixed sequence start to finish) — --project=. ensures the match is played under the home ground's specific pitch conditions, not a generic one.

Useful REPL Features

The REPL supports Tab-completion for function names, variable names, and even LaTeX-style Unicode input (typing \alpha then Tab inserts α), which is how idiomatic Julia code ends up using mathematical symbols directly. Every evaluated expression's result is also stored in the special variable ans, so 2 + 2 followed on the next line by ans * 10 gives 40, and pressing the up arrow cycles through persistent command history that's saved across sessions in ~/.julia/logs/repl_history.jl.

🏏

Cricket analogy: It's like a scoreboard operator's shortcut keys auto-completing a batsman's name after just a few letters typed — the REPL's Tab-completion finishes function and variable names for you, and \alpha+Tab even typesets Greek letters the way a broadcast graphic renders special symbols.

text
$ julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org release
|__/                   |

julia> 2 + 2
4

julia> ans * 10
40

help?> println
search: println print

  println([io::IO], xs...)

  Print the arguments to the given stream, followed by a newline...

(@v1.10) pkg> add DataFrames
   Resolving package versions...
    Updating `~/.julia/environments/v1.10/Project.toml`
  [a93c6f00] + DataFrames v1.6.1

shell> ls
Project.toml  script.jl  src

Run versioninfo() at the julia> prompt (or julia --version in the terminal) to confirm exactly which Julia build, OS, and CPU architecture a REPL session is using — invaluable when debugging a bug report that only reproduces on one machine.

Don't run heavy numerical loops directly at the top-level julia> prompt for performance testing — global-scope variables in the REPL are not type-stable by default, so a loop that looks slow there can be dramatically faster once wrapped inside a function. Always benchmark inside a function.

  • juliaup is the official installer and version manager for Julia, letting multiple versions coexist and be selected per project.
  • The REPL has four modes: Julian (default), help (?), package (]), and shell (;), each reached with a single keystroke.
  • Backspace on an empty line exits a special mode back to julia>; Ctrl+D exits the REPL entirely.
  • Revise.jl auto-reloads edited source files into a running session, avoiding slow restart-and-recompile cycles.
  • Use julia script.jl to run a file non-interactively, and --project=. to ensure it uses the correct local package environment.
  • Tab-completion supports LaTeX-style Unicode input (e.g., \alpha+Tab → α), and ans always holds the last REPL result.

Practice what you learned

Was this page helpful?

Topics covered

#Programming#JuliaStudyNotes#InstallingJuliaAndTheREPL#Installing#Julia#REPL#Modes#StudyNotes#SkillVeris#ExamPrep