Installing Scala
In this page:
Installing Scala
Scala runs on the JVM, so a JDK must be installed first, followed by the Scala toolchain itself (compiler, REPL, and build tools). Most developers install Scala via coursier (the cs command) or a package manager. Once installed, scala and scalac become available on your PATH.
Note: Run scala -version after installing to confirm both the JVM and Scala toolchain are set up correctly.
Example: Installing Scala
# Linux (using coursier)
curl -fL https://github.com/coursier/coursier/releases/latest/download/cs-x86_64-pc-linux.gz | gzip -d > cs
chmod +x cs && ./cs setup
# macOS (Homebrew)
brew install scala
# Windows (Chocolatey)
choco install scala
# Verify installation (all platforms)
scala -version
⚠️ Run this command in your terminal.
🔒
Chapter Quiz — Complete all 8 topics to unlock
0/8 topics done
Complete these topics first: