Installation
Installing SDKMAN! on UNIX is a breeze. It effortlessly sets up on macOS, Linuxand 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 anew 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.19.0
native:0.5.0
Windows installation
For Windows, there are two installation routes:
- WSL Approach: Install Windows Subsystem for Linux (WSL) before attemptingSDKMAN 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 tosupplement it with MinGW to have the required toolset for SDKMAN. There aresome issues with this approach, but it works for the most part.
Remember, SDKMAN requires a bash environment to run. On Windows, it can't benatively installed; you need WSL or MSYS+MinGW. We no longer support Cygwin.
Beta channel
To leave the beta channel, simply setsdkman_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 ~/.sdkmanRemove initialization snippet from your shell configs. Edit and remove theinitialisation snippet from your
.bashrc
,.bash_profile
and/or.profile
files. If you use ZSH, remove it from the.zshrc
file. The snippet of codeto 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 folderdoesn't exist. ExportSDKMAN_DIR
before installing:
exportSDKMAN_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, addrcupdate=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 intoUsage.