In this tutorial, we will show you how to install SDKMAN on Ubuntu 22.04 LTS. SDKMAN! is a powerful tool that provides a versatile solution for managing parallel versions of multiple Software Development Kits (SDKs) on most Unix-based systems. It provides a convenient Command Line Interface (CLI) for installing, switching, removing, and listing Candidates.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘
sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the SDKMAN on Ubuntu 22.04 (Jammy Jellyfish). You can follow the same instructions for Ubuntu 22.04 and any other Debian-based distribution like Linux Mint, Elementary OS, Pop!_OS, and more as well.
- A server running one of the following operating systems: Ubuntu 22.04, 20.04, and any other Debian-based distribution like Linux Mint.
- SSH access to the server (or just open Terminal if you’re on a desktop).
- Basic knowledge of the Linux command-line interface (CLI). This guide assumes you’re comfortable with executing commands in a terminal.
- An active internet connection. You’ll need an internet connection to download the necessary packages and dependencies for SDKMAN.
non-root sudo useror access to the
root user. We recommend acting as a
non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.
Install SDKMAN on Ubuntu 22.04 LTS Jammy Jellyfish
Step 1. Before we dive into the installation process, it’s essential to ensure that you have the necessary prerequisites. You should have a basic understanding of Linux and the command-line interface. Additionally, you should have Ubuntu 22.04 LTS installed on your system. It‘s also crucial to ensure that your system packages are up-to-date. You can do this by running the following commands:
sudo apt update sudo apt upgrade
Step 2. Installing SDKMAN on Ubuntu 22.04.
Now that we have the necessary tools installed, we can proceed with installing SDKMAN!. The installation process is straightforward and involves a single command:
curl -s "https://get.sdkman.io" | bash
This command downloads the SDKMAN! installation script and pipes it to the bash shell for execution. Once the installation is complete, you need to open a new terminal or enter the following command to start using SDKMAN!:
To verify that SDKMAN! is installed correctly, you can use the version command:
If the installation was successful, this command should return the installed version of SDKMAN!. If you encounter any issues during the installation, ensure that you have the necessary prerequisites and that your internet connection is stable.
Step 3. Using SDKMAN!.
SDKMAN! provides a simple CLI for managing your SDKs. You can install a specific version of an SDK using the install command. For example, to install Java version 11.0.3, you would use:
sdk install java 11.0.3-open
You can switch between different versions of an SDK using the use command, and remove an SDK version with the uninstall command. To list all the available versions of an SDK, you can use the list command:
Keeping SDKMAN! updated ensures that you have access to the latest features and bug fixes. You can update SDKMAN! to the latest version using the following command:
If for any reason you need to uninstall SDKMAN!, you can do so by simply removing the .sdkman directory from your home directory:
rm -rf "$HOME/.sdkman"
Congratulations! You have successfully installed SDKMAN. Thanks for using this tutorial for installing SDKMAN on Ubuntu 22.04 LTS Jammy Jellyfish system. For additional help or useful information, we recommend you check the official SDKMAN website.