Install ksh on Ubuntu

In this tutorial we learn how to install ksh on Ubuntu Linux. ksh (Korn Shell) is a *NIX shell initially developed by David Korn in late 80’s

Introduction

In this tutorial we learn how to install ksh on Ubuntu Linux. This tutorial can be applied on any Ubuntu release including but not limited to Ubuntu 20.04, Ubuntu 18.04, and Ubuntu 16.04.

You can also apply this tutorial on any ubuntu variants like Kubuntu and Xubuntu.

Ksh (KornShell) is a UNIX shell developed by David Korn at Bell Labs in the early 80. Initially developed from bourne shell source code.

Install ksh on Ubuntu

ksh is available on Ubuntu repository. To install ksh on Ubuntu Linux we can do the following commands.

First, let’s update apt metadata using command below.

sudo apt-get update

Install ksh using command below

sudo apt-get install ksh

of course you can also use apt instead of apt-get to install ksh.

sudo apt install ksh

It will provide output similar to image below. Press Y to continue the installation process.

sudo apt-get install ksh image

Using ksh

After successfully install ksh we can start using ksh by running ksh from current shell

ksh

To check what is the running shell we can use command below

ps -p $$

It should provide output similar to output below

   PID TTY          TIME CMD
  55113 pts/0    00:00:00 ksh

Summary

In this tutorial we learn how to install ksh on Ubuntu Linux. While ksh is not a mainstream or common shell nowadays, having ksh on your Ubuntu Linux system might be necessary to run legacy scripts built in ksh. Until then.