← 返回命令列表

Linux command

sdk 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

List all available candidates

sdk list

List available versions

sdk list java

Install the latest stable version

sdk install java

Install a specific version

sdk install java [21.0.4-tem]

Switch to a version

sdk use java [17.0.12-tem]

Set a version as default

sdk default java [21.0.4-tem]

Show currently active versions

sdk current

Upgrade outdated candidates

sdk upgrade

说明

SDKMAN (Software Development Kit Manager) is a tool for managing parallel versions of multiple SDKs on Unix-based systems. It simplifies installing, switching, and removing development kits for the JVM ecosystem. Supported candidates include Java (multiple distributions like Temurin, Zulu, GraalVM), Scala, Kotlin, Groovy, Maven, Gradle, Ant, sbt, Spring Boot, Spark, and many more. SDKMAN automatically manages JAVA_HOME and PATH environment variables. Project-specific versions can be configured using .sdkmanrc files. With sdkman_auto_env=true in the config, SDKMAN automatically switches versions when entering a project directory.

FAQ

What is the sdk command used for?

SDKMAN (Software Development Kit Manager) is a tool for managing parallel versions of multiple SDKs on Unix-based systems. It simplifies installing, switching, and removing development kits for the JVM ecosystem. Supported candidates include Java (multiple distributions like Temurin, Zulu, GraalVM), Scala, Kotlin, Groovy, Maven, Gradle, Ant, sbt, Spring Boot, Spark, and many more. SDKMAN automatically manages JAVA_HOME and PATH environment variables. Project-specific versions can be configured using .sdkmanrc files. With sdkman_auto_env=true in the config, SDKMAN automatically switches versions when entering a project directory.

How do I run a basic sdk example?

Run `sdk list` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

Where can I find more sdk examples?

This page includes 8 examples for sdk, plus related commands for nearby Linux tasks.