Kotlin is a new statically typed language from JetBrains. JetBrains is famous for its popular Java IDE IntelliJ. Kotlin was recently open-sourced and the compiler made accessible through Github. It is a completely supported programming language by Google on Android and can be directly included in the Android Studio IDE package as an alternative to the standard Java compiler.
Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform related Kotlin queries.
In this context, we will look into the steps necessary to build and install the compiler and run a program on Ubuntu.
Steps to Install Kotlin Compiler on Ubuntu 20.04 LTS Focal Fossa
1. Perform system update and install Snapd
First, make sure that all your system packages are up-to-date by running the following apt commands in the terminal:
$ sudo apt update
$ sudo apt upgrade
$ sudo apt install snapd
2. Install Kotlin Compiler on the system
There are two ways on installing Kotlin Compiler:
i. Install Kotlin using Snap package
The simplest and easiest way to install Kotlin in Ubuntu is to use the official Kotlin snap package. run the following command to install Kotlin:
$ sudo snap install kotlin --classic
ii. Install Kotlin Manually on Ubuntu.
You can manually install Kotlin using SDKMAN:
$ curl -s https://get.sdkman.io | bash
sdk install kotlin
How to confirm Kotlin Compiler installation ?
To confirm whether the Kotlin has successfully installed in your machine, launch another terminal and start executing the below command:
[Need assistance in installing any Software on your Linux system ? We can help you. ]