Choose your platform

IntelliJ IDEA

The best experience for Kotlin. Community Edition is free and includes full Kotlin support.

1

Download IntelliJ IDEA

Get the Community or Ultimate edition from jetbrains.com/idea.

2

Create a new project

File → New → Project → Kotlin → JVM. The IDE bundles the Kotlin plugin and downloads the compiler automatically.

3

Write & run

Create a Kotlin file, add a main function, and click the green Run gutter icon.

Note: Kotlin plugin updates ship with IDE updates. You can also update the plugin via Settings → Plugins.

Command-line compiler

Official compiler packages for Linux, macOS, and Windows.

Manual download

  1. Download the latest compiler from GitHub Releases.
  2. Unpack the archive.
  3. Add the bin directory to your PATH.
bash
# Example (Linux / macOS)
curl -LO https://github.com/JetBrains/kotlin/releases/download/v2.0.21/kotlin-compiler-2.0.21.zip
unzip kotlin-compiler-2.0.21.zip
export PATH="$PATH:$(pwd)/kotlinc/bin"
kotlinc -version

Compile & run

bash
kotlinc hello.kt -include-runtime -d hello.jar
java -jar hello.jar

# Or use the Kotlin runner directly
kotlin hello.jar

SDKMAN (Linux / macOS)

bash
# Install SDKMAN if you don't have it
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"

# Install Kotlin
sdk install kotlin
kotlin -version

Homebrew (macOS)

bash
brew install kotlin
kotlin -version

Snap (Linux)

bash
sudo snap install --classic kotlin

Android Studio

Android Studio includes full Kotlin support out of the box.

1

Download Android Studio

Get it from developer.android.com/studio.

2

New project with Kotlin

When creating a project, select Kotlin as the language. Empty Activity is a good starting template.

3

Verify

Open any .kt file — syntax highlighting and the Run configuration should work immediately.

Verify your installation

bash
kotlin -version
# Expected: Kotlin version 2.x.x ...

kotlinc -version

Gradle Kotlin DSL

For multi-module or multiplatform projects, Gradle is the standard build tool. Create a new project in IntelliJ with the Kotlin Gradle template, or use the CLI:

bash
# Using the Gradle wrapper is preferred in real projects
./gradlew build
./gradlew run

Next

Installation complete? Head to the Coding guide for language features and examples, or return to Getting Started.