How To Install mksh on CentOS 7

In this tutorial we learn how to install mksh on CentOS 7. mksh is MirBSD enhanced version of the Korn Shell

Introduction

In this tutorial we learn how to install mksh on CentOS 7.

What is mksh

mksh is the MirBSD enhanced version of the Public Domain Korn shell (pdksh), a bourne-compatible shell which is largely similar to the original AT&T Korn shell. It includes bug fixes and feature improvements in order to produce a modern, robust shell good for interactive and especially script use, being a bourne shell replacement, pdksh successor and an alternative to the C shell.

We can use yum or dnf to install mksh on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install mksh.

Install mksh on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

After updating yum database, We can install mksh using yum by running the following command:

sudo yum -y install mksh

Install mksh on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

After updating yum database, We can install mksh using dnf by running the following command:

sudo dnf -y install mksh

How To Uninstall mksh on CentOS 7

To uninstall only the mksh package we can use the following command:

sudo dnf remove mksh

References

Summary

In this tutorial we learn how to install mksh on CentOS 7 using yum and dnf.