How to install sdk (SDKMAN) on Linux or Unix or FreeBSD/MacOS

Fig.01: Installing SDKMAN

Fig.01: Installing SDKMAN

You can install sdk (SDKMAN – Software Development Kit Manager) on Linux or Unix or FreeBSD/MacOS as follows. Open the terminal app and type the following command:
$ curl -s "" | bash
Sample outputs:

Thanks for using...                                            		         
   SS:::::::::::::::SD::::::::::::DDD    K:::::::K    K:::::K                  
  S:::::SSSSSS::::::SD:::::::::::::::DD  K:::::::K    K:::::K                  
  S:::::S     SSSSSSSDDD:::::DDDDD:::::D K:::::::K   K::::::K                  
  S:::::S              D:::::D    D:::::DKK::::::K  K:::::KKK                  
  S:::::S              D:::::D     D:::::D K:::::K K:::::K                     
   S::::SSSS           D:::::D     D:::::D K::::::K:::::K                      
    SS::::::SSSSS      D:::::D     D:::::D K:::::::::::K                       
      SSS::::::::SS    D:::::D     D:::::D K:::::::::::K                       
         SSSSSS::::S   D:::::D     D:::::D K::::::K:::::K                      
              S:::::S  D:::::D     D:::::D K:::::K K:::::K                     
              S:::::S  D:::::D    D:::::DKK::::::K  K:::::KKK                  
  SSSSSSS     S:::::SDDD:::::DDDDD:::::D K:::::::K   K::::::K                  
  S::::::SSSSSS:::::SD:::::::::::::::DD  K:::::::K    K:::::K                  
  S:::::::::::::::SS D::::::::::::DDD    K:::::::K    K:::::K                  
                      mmmmmmm    mmmmmmm     aaaaaaaaaaaaa  nnnn  nnnnnnnn     
                    mm:::::::m  m:::::::mm   a::::::::::::a n:::nn::::::::nn   
                   m::::::::::mm::::::::::m  aaaaaaaaa:::::an::::::::::::::nn  
                   m::::::::::::::::::::::m           a::::ann:::::::::::::::n 
                   m:::::mmm::::::mmm:::::m    aaaaaaa:::::a  n:::::nnnn:::::n 
                   m::::m   m::::m   m::::m  aa::::::::::::a  n::::n    n::::n 
                   m::::m   m::::m   m::::m a::::aaaa::::::a  n::::n    n::::n 
                   m::::m   m::::m   m::::ma::::a    a:::::a  n::::n    n::::n 
                   m::::m   m::::m   m::::ma::::a    a:::::a  n::::n    n::::n 
                   m::::m   m::::m   m::::ma:::::aaaa::::::a  n::::n    n::::n 
                   m::::m   m::::m   m::::m a::::::::::aa:::a n::::n    n::::n 
                   mmmmmm   mmmmmm   mmmmmm  aaaaaaaaaa  aaaa nnnnnn    nnnnnn 
                                                 Now attempting installation...
Looking for a previous installation of SDKMAN...
Looking for unzip...
Looking for zip...
Looking for curl...
Looking for sed...
Installing SDKMAN scripts...
Create distribution directories...
Getting available candidates...
Prime the config file...
Download script archive...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
  0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0
100 20838  100 20838    0     0   4576      0  0:00:04  0:00:04 --:--:-- 11386
Extract script archive...
Install scripts...
Set version to 5.5.9+231 ...
Attempt update of bash profiles...
Updated existing /home/vivek/.profile
Updated existing /home/vivek/.bashrc
Attempt update of zsh profiles...
Created and initialised /home/vivek/.zshrc

All done!

Please open a new terminal, or run the following in the existing one:

    source "/home/vivek/.sdkman/bin/"

Then issue the following command:

    sdk help


Type the following command:
$ source $HOME/.sdkman/bin/
$ sdk help

Sample outputs:

Usage: sdk  [candidate] [version]
       sdk offline 

       install   or i     [version]
       uninstall or rm    
       list      or ls   [candidate]
       use       or u     [version]
       default   or d     [version]
       current   or c    [candidate]
       upgrade   or ug   [candidate]
       version   or v
       broadcast or b
       help      or h
       offline           [enable|disable]
       selfupdate        [force]

   candidate  :  the SDK to install: groovy, scala, grails, gradle, kotlin, etc.
                 use list command for comprehensive list of candidates
                 eg: $ sdk list

   version    :  where optional, defaults to latest stable if not provided
                 eg: $ sdk install groovy

To see a list of all sdk, run:

$ sdk list

Install the latest version of groovy

$ sdk install groovy

Install the latest version of scala

$ sdk install scala

Install the latest version of grails

$ sdk install grails

Install the latest version of gradle

$ sdk install gradle

Install the latest version of kotlin

$ sdk install kotlin

Examples and usage: How to install kotlin programming language on Ubuntu/Debian Linux