UbuntuUbuntu Based

How To Install SDKMAN on Ubuntu 22.04 LTS

Install SDKMAN on Ubuntu 22.04

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.

Prerequisites

  • 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.
  • A non-root sudo user or 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!:

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

To verify that SDKMAN! is installed correctly, you can use the version command:

sdk version

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:

sdk list

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:

sdk self-update

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.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button