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:
- 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.
- 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
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:
-
Optionally backup and then remove the installation:
tar zcvf ~/sdkman-backup_$(date +%F-%kh%M).tar.gz -C ~/ .sdkman
rm -rf ~/.sdkman -
Remove initialization snippet from your shell configs. 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.