This article is crafted for Linux enthusiasts who aim to install SDKMAN on Ubuntu 22.04 LTS (Jammy Jellyfish). SDKMAN is a potent tool that empowers developers to manage multiple Software Development Kits (SDKs) on Unix-based systems, providing a flexible and convenient Command Line Interface (CLI).
Preparation
Before delving into the installation process, it’s crucial to ensure that your system fulfills the necessary prerequisites. You should possess a rudimentary understanding of Linux and the command-line interface. Moreover, you should have Ubuntu 22.04 LTS installed on your system. Also, it’s essential to make sure that your system packages are up-to-date. You can achieve this by running the following commands:
sudo apt update sudo apt upgrade
Prerequisites
To proceed with the installation, ensure you meet the following conditions:
- A server running Ubuntu 22.04, 20.04, or any other Debian-based distribution like Linux Mint.
- SSH access to the server (or just open Terminal if you’re on a desktop).
- Basic understanding of the Linux command-line interface (CLI).
- An active internet connection.
- A
non-root sudo user
or access to theroot user
.
Installation
With the necessary tools installed, you can now 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:
source "$HOME/.sdkman/bin/sdkman-init.sh"
Verifying SDKMAN Installation
To confirm that SDKMAN is correctly installed, you can use the version command:
sdk version
If the installation was successful, this command should return the installed version of SDKMAN.
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 java11.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:
sdk list
Updating SDKMAN
It’s crucial to keep SDKMAN updated to gain access to the latest features and bug fixes. You can update SDKMAN to the most recent version using the following command:
sdk self-update
Uninstallation
If 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 on your Ubuntu 22.04 LTS Jammy Jellyfish system. By following this step-by-step guide, you should now have SDKMAN up and running on your system.
If managing a VPS is not your area of expertise, or if you simply don’t have the time, Shape.host offers a “Cloud VPS Managed Service”, starting from $4. Contact Shape.host to get the best deal.