aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
    • Learning
  • Tools
  • About
  • Engineering
  • Software Engineering
  • Technology

How-To: Install Kotlin on Ubuntu 22.04

  • aster.cloud
  • September 7, 2022
  • 2 minute read

Prerequisites

  • Ubuntu 22.04
  • Java is installed. See here on how to install Java on Ubuntu 22.04.

Install via SDKMAN

01. Open a terminal and install unzip and zip programs needed by SDKMAN.

SDKMAN! is a tool for managing parallel versions of multiple Software Development Kits on most Unix based systems


Partner with aster.cloud
for your next big idea.
Let us know here.



From our partners:

CITI.IO :: Business. Institutions. Society. Global Political Economy.
CYBERPOGO.COM :: For the Arts, Sciences, and Technology.
DADAHACKS.COM :: Parenting For The Rest Of Us.
ZEDISTA.COM :: Entertainment. Sports. Culture. Escape.
TAKUMAKU.COM :: For The Hearth And Home.
ASTER.CLOUD :: From The Cloud And Beyond.
LIWAIWAI.COM :: Intelligence, Inside and Outside.
GLOBALCLOUDPLATFORMS.COM :: For The World's Computing Needs.
FIREGULAMAN.COM :: For The Fire In The Belly Of The Coder.
ASTERCASTER.COM :: Supra Astra. Beyond The Stars.
BARTDAY.COM :: Prosperity For Everyone.

$ sudo apt update$ sudo apt install unzip$ sudo apt install zip

02.Install SDKMAN, which will be used to install Kotlin.

$ cd ~$ curl -s https://get.sdkman.io | bash

03. Run the initialization script and follow the instructions on-screen to install SDKMAN. In this example, the script is located under the /home/geek/ directory, your command will be different.

$ source "/home/geek/.sdkman/bin/sdkman-init.sh"

04. Check if SDKMAN has been installed by checking its version.

$ sdk version

05. Install Kotlin

$ sdk install kotlin

06. Verify that Kotlin is installed. The following should output the version of Kotlin installed.

$ kotlin -version

If you are greeted with the following message, then it means that Java is not installed on your system. Follow the guide here on installing Java on Ubuntu.

If installed correctly, it will show the Kotlin version.

Running Kotlin

Run a Kotlin program that shows a message to the console/output.

01. Create a file named hello-geek.kt

$ cd ~
$ nano hello-geek.kt
 

Set the content as follows

fun main() {    
  println("Hello, Geek!")
}

02. Compile the application using Kotlin. This creates a JAR (Java Archive) file

$ kotlinc hello-geek.kt -include-runtime -d hello-geek.jar

03. Run the application using Java

$ java -jar hello-geek.jar

Kotlin is a great language, as an alternative to using Java. If you are using the JVM and you want to use a different language aside from Java, this is a good option.

Read More  How To Install MySQL Workbench For Ubuntu

For enquiries, product placements, sponsorships, and collaborations, connect with us at [email protected]. We'd love to hear from you!

Our humans need coffee too! Your support is highly appreciated, thank you!

aster.cloud

Related Topics
  • Kotlin
  • Programming Language
  • Tutorials
  • Ubuntu
  • Ubuntu 22.04
You May Also Like
View Post
  • Computing
  • Multi-Cloud
  • Technology

Send SMS texts with Amazon’s SNS simple notification service

  • July 1, 2025
View Post
  • Computing
  • Multi-Cloud
  • Technology

Host a static website on AWS with Amazon S3 and Route 53

  • June 27, 2025
View Post
  • Computing
  • Multi-Cloud
  • Technology

Prioritize security from the edge to the cloud

  • June 25, 2025
View Post
  • Computing
  • Multi-Cloud
  • Technology

6 edge monitoring best practices in the cloud

  • June 25, 2025
Genome
View Post
  • Technology

AlphaGenome: AI for better understanding the genome

  • June 25, 2025
View Post
  • Computing
  • Multi-Cloud
  • Technology

Pure Accelerate 2025: All the news and updates live from Las Vegas

  • June 18, 2025
View Post
  • Computing
  • Multi-Cloud
  • Technology

‘This was a very purposeful strategy’: Pure Storage unveils Enterprise Data Cloud in bid to unify data storage, management

  • June 18, 2025
View Post
  • Computing
  • Multi-Cloud
  • Technology

What is cloud bursting?

  • June 18, 2025

Stay Connected!
LATEST
  • Send SMS texts with Amazon’s SNS simple notification service
    • July 1, 2025
  • Camping 2
    The Summer Adventures : Camping Essentials
    • June 27, 2025
  • Host a static website on AWS with Amazon S3 and Route 53
    • June 27, 2025
  • Prioritize security from the edge to the cloud
    • June 25, 2025
  • 6 edge monitoring best practices in the cloud
    • June 25, 2025
  • Genome 6
    AlphaGenome: AI for better understanding the genome
    • June 25, 2025
  • 7
    Pure Accelerate 2025: All the news and updates live from Las Vegas
    • June 18, 2025
  • 8
    ‘This was a very purposeful strategy’: Pure Storage unveils Enterprise Data Cloud in bid to unify data storage, management
    • June 18, 2025
  • What is cloud bursting?
    • June 18, 2025
  • 10
    There’s a ‘cloud reset’ underway, and VMware Cloud Foundation 9.0 is a chance for Broadcom to pounce on it
    • June 17, 2025
about
Hello World!

We are aster.cloud. We’re created by programmers for programmers.

Our site aims to provide guides, programming tips, reviews, and interesting materials for tech people and those who want to learn in general.

We would like to hear from you.

If you have any feedback, enquiries, or sponsorship request, kindly reach out to us at:

[email protected]
Most Popular
  • Oracle adds xAI Grok models to OCI
    • June 17, 2025
  • What is confidential computing?
    • June 17, 2025
  • Fine-tune your storage-as-a-service approach
    • June 16, 2025
  • 4
    Advanced audio dialog and generation with Gemini 2.5
    • June 15, 2025
  • Google Cloud, Cloudflare struck by widespread outages
    • June 12, 2025
  • /
  • Technology
  • Tools
  • About
  • Contact Us

Input your search keywords and press Enter.