Getting Started

Welcome to Clojure!

Check out Learn Clojure, Resources, or Books to learn the language! If you have questions, you can search or ask at the official forum Ask Clojure.


Clojure requires Java. Clojure officially supports Java LTS releases (currently Java 8, 11, and 17), but also tries to ensure interim versions work as well. You can use any Java installation, whether it’s a commercial release from Oracle or an open source version based on OpenJDK (like Temurin).

The Clojure tools require that either the java command is on the path or that the JAVA_HOME environment variable is set.

Clojure installer and CLI tools

Clojure provides command line tools that can be used to start a Clojure repl, use Clojure and Java libraries, and start Clojure programs.

Follow these instructions to install the latest release of the clj and clojure tools:

Installation on Mac via Homebrew

Install the command line tools with brew from the clojure/tools tap:

brew install clojure/tools/clojure

If you’ve already installed this way in the past, you can upgrade to the latest release with:

brew upgrade clojure/tools/clojure

Installation on Linux

To install with the Linux script installer:

  1. Ensure that the following dependencies are installed: bash, curl, rlwrap, and Java.

  2. Use the linux-install script to download and run the install, which will create the executables /usr/local/bin/clj, /usr/local/bin/clojure, and the directory /usr/local/lib/clojure:

curl -O
chmod +x
sudo ./

Custom location

To install to a custom location (like /opt/infrastructure/clojure), use the option --prefix:

sudo ./ --prefix /opt/infrastructure/clojure

Extend the MANPATH in /etc/man_db.conf to include the manual pages:

MANPATH_MAP /opt/infrastructure/clojure/bin /opt/infrastructure/clojure/man

The linux-install script can be removed after installation.

Installation on Windows

An early release version of clj on Windows is available at clj on Windows. Please provide feedback on Ask Clojure or Clojurians slack in #clj-on-windows.

Other versions

See the changelog for version history and the Clojure tap for info on installing older versions or newer prereleases instead.

Other ways to run Clojure

Local build

Most Clojure users use Clojure jars downloaded from the Maven central repository (by the tools above or other Clojure build tools). However, you can also build Clojure from source with necessary dependent jars into a single executable jar (requires Git, Java, and Maven):

git clone
cd clojure
mvn -Plocal -Dmaven.test.skip=true package

Then start the REPL with the local jar (note this will not work with the jars in Maven as they do not include dependencies):

java -jar clojure.jar

Try Clojure online provides a browser-based Clojure repl for interactive exploration.

Original author: Alex Miller