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
  • SD-WAN security

    SD-WAN security refers to the practices, protocols and technologies protecting data and resources transmitted across ...

  • net neutrality

    Net neutrality is the concept of an open, equal internet for everyone, regardless of content consumed or the device, application ...

  • network scanning

    Network scanning is a procedure for identifying active devices on a network by employing a feature or features in the network ...

Security
  • Patch Tuesday

    Patch Tuesday is the unofficial name of Microsoft's monthly scheduled release of security fixes for the Windows operating system ...

  • Pegasus malware

    Pegasus malware is spyware that can hack any iOS or Android device and steal a variety of data from the infected device, ...

  • risk-based patch management (RBPM)

    Risk-based patch management (RBPM) is an approach to implementing patches to fix software code that prioritizes patches that ...

CIO
  • strategic management

    Strategic management is the ongoing planning, monitoring, analysis and assessment of all necessities an organization needs to ...

  • IT budget

    IT budget is the amount of money spent on an organization's information technology systems and services. It includes compensation...

  • project scope

    Project scope is the part of project planning that involves determining and documenting a list of specific project goals, ...

HRSoftware
  • digital HR

    Digital HR is the digital transformation of HR services and processes through the use of social, mobile, analytics and cloud (...

  • employee onboarding and offboarding

    Employee onboarding involves all the steps needed to get a new employee successfully deployed and productive, while offboarding ...

  • succession planning

    Succession planning is the strategic process of identifying and developing internal candidates to fill key organizational roles ...

Customer Experience
  • chatbot

    A chatbot is a software or computer program that simulates human conversation or "chatter" through text or voice interactions.

  • martech (marketing technology)

    Martech (marketing technology) refers to the integration of software tools, platforms, and applications designed to streamline ...

  • transactional marketing

    Transactional marketing is a business strategy that focuses on single, point-of-sale transactions.

Close