Menu

Installation

Installing SDKMAN! on UNIX is a breeze. It effortlessly sets up on macOS, Linux and Windows (with WSL). Plus, it's compatible with both Bash and ZSH shells.

Just launch a new terminal and type in:

$ curl -s "https://get.sdkman.io" | bash

Follow the on-screen instructions to wrap up the installation. Afterward, open a new terminal or run the following in the same shell:

$ source "$HOME/.sdkman/bin/sdkman-init.sh"

Lastly, run the following snippet to confirm the installation's success:

$ sdk version

You should see output containing the latest script and native versions:

SDKMAN!
script: 5.18.2
native: 0.4.6

Windows installation

For Windows, there are two installation routes:

  1. WSL Approach: Install Windows Subsystem for Linux (WSL) before attempting SDKMAN installation. A basic toolset (bash, zip, unzip, curl) is necessary. Most times, it works out of the box.
  2. Git Bash Solution: If you use Git Bash for Windows, you'll need to supplement it with MinGW to have the required toolset for SDKMAN. There are some issues with this approach, but it works for the most part.

Remember, SDKMAN requires a bash environment to run. On Windows, it can't be natively installed; you need WSL or MSYS+MinGW. We no longer support Cygwin.

Beta channel

Feeling adventurous? We've got a beta channel. New CLI features hit this channel first for trial. You can join by installing it directly:

$ curl -s "https://beta.sdkman.io" | bash

To leave the beta channel, simply set sdkman_beta_channel to false in ~/.sdkman/etc/config, then run:

$ sdk selfupdate force

Uninstallation

Here is how you go about removing SDKMAN! from your system:

  1. Optionally backup and then remove the installation:
  2. $ tar zcvf ~/sdkman-backup_$(date +%F-%kh%M).tar.gz -C ~/ .sdkman
    $ rm -rf ~/.sdkman
  3. Remove initialization snippet from your shell configs.
  4. Edit and remove the initialisation snippet from your .bashrc, .bash_profile and/or .profile files. If you use ZSH, remove it from the .zshrc file. The snippet of code to be removed looks something like this:
    #THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
    [[ -s "/home/dudette/.sdkman/bin/sdkman-init.sh" ]] && source "/home/dudette/.sdkman/bin/sdkman-init.sh"
    Once removed, you have successfully uninstalled SDKMAN! from your machine.

Install to a custom location

Lastly, if you want to install SDKMAN! in a custom location, like /usr/local/sdkman, make sure you have full access rights and that the folder doesn't exist. Export SDKMAN_DIR before installing:

$ export SDKMAN_DIR="/usr/local/sdkman" && curl -s "https://get.sdkman.io" | bash

Install without modifying shell config

And for installs on CI where shell config modification isn't appropriate, add rcupdate=false as a parameter when downloading the installer:

$ curl -s "https://get.sdkman.io?rcupdate=false" | bash

That's all there is to it! Now let's dive into Usage.