Browse Definitions :
Definition

Korn shell (ksh)

What is Korn shell (ksh)?

The Korn shell (ksh) is an operating system (OS) command shell that was developed for Unix by David Korn at Bell Labs. A shell is a command execution program, or command interpreter, that interfaces with an OS to run commands or to run scripts that contain commands. The Korn shell is one of many types of command shells available for different operating systems.

The Korn shell, also referred to as KornShell, was introduced in 1983 and included its own scripting language. It combined many of the best features of the two most widely used shells at the time: the C shell (csh) developed by Bill Joy at the University of California, Berkley, and the Bourne shell developed by Stephen Bourne at Bell Labs. The Korn shell was more efficient than the other two and offered better performance.

The Korn shell is highly compatible with the Bourne shell. The Korn shell uses the same dollar sign ($) prompt for user input, and most scripts written for the Bourne shell can run in the Korn shell. Users familiar with the Bourne shell typically have little problem switching to the Korn shell. The Korn shell is also easier to use, which is why inexperienced users often prefer the Korn shell over the Bourne shell.

list of Unix commands
Unix supports multiple shells that provide a command-line user interface to interact with an operating system (OS), among them Korn shell.

Korn shell history and improvements

After its introduction in 1983, the Korn shell was updated in 1986, then in 1988, and again in 1993. The 1993 version represented a major rewrite of the 1988 version. In addition to improving performance and security, the 1993 edition also added or enhanced several important features, including the following:

  • Extended input/output (I/O) capabilities and greater support for arrays.
  • Improved command history support.
  • In-line editing though EMACS-TC or vi functions.
  • Enhanced support for shell functions and aliases.
  • Improved substring capabilities and pattern matching.
  • Improved debugging and job control functionality.
  • Greater extensibility.

At the time, the 1993 version (ksh93) was owned by both Lucent and AT&T and was considered proprietary software. However, the Korn source code was eventually released under the Eclipse Public License and made available as open source software.

The last stable release (93u+ 2012-08-01) is available on GitHub, where it continues to receive bug fixes and patches. The releases that incorporate these fixes are referred to as reboots and include the letter "m" after the plus sign, as in 93u+m. The reboots include fixes and patches from Solaris, Red Hat and OpenSUSE, along with contributions from the development community. The latest reboot to incorporate these fixes is ksh 93u+m/1.0.4.

Ksh2020 and beyond

Between 2017 and 2020, a group of developers attempted to revitalize the Korn shell, an effort dubbed ksh2020. Their goal was to extensively refactor one of the beta versions (93v-) to address bug and stability issues. However, the project never got off the ground and was eventually abandoned.

The Korn shell is still in use today on both Unix and Unix-like systems such as Linux and macOS, although many users now rely on Bash and other command shells instead of Korn. For example, Bash is currently the default shell in many Linux systems, such as Ubuntu and Fedora, and until 2019, it was also the default shell in macOS (the default shell is now zsh). Despite this trend, the Korn shell is still being used and is the default shell on systems such as IBM AIX.

Learn shell scripts in this sys admin's guide to automation and explore advanced shell scripting for IT ops professionals.

This was last updated in June 2023

Continue Reading About Korn shell (ksh)

Networking
  • What is wavelength?

    Wavelength is the distance between identical points, or adjacent crests, in the adjacent cycles of a waveform signal propagated ...

  • subnet (subnetwork)

    A subnet, or subnetwork, is a segmented piece of a larger network. More specifically, subnets are a logical partition of an IP ...

  • Transmission Control Protocol (TCP)

    Transmission Control Protocol (TCP) is a standard protocol on the internet that ensures the reliable transmission of data between...

Security
CIO
  • What is a startup company?

    A startup company is a newly formed business with particular momentum behind it based on perceived demand for its product or ...

  • What is a CEO (chief executive officer)?

    A chief executive officer (CEO) is the highest-ranking position in an organization and responsible for implementing plans and ...

  • What is labor arbitrage?

    Labor arbitrage is the practice of searching for and then using the lowest-cost workforce to produce products or goods.

HRSoftware
  • organizational network analysis (ONA)

    Organizational network analysis (ONA) is a quantitative method for modeling and analyzing how communications, information, ...

  • HireVue

    HireVue is an enterprise video interviewing technology provider of a platform that lets recruiters and hiring managers screen ...

  • Human Resource Certification Institute (HRCI)

    Human Resource Certification Institute (HRCI) is a U.S.-based credentialing organization offering certifications to HR ...

Customer Experience
Close