Browse Definitions :

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)

  • identity management (ID management)

    Identity management (ID management) is the organizational process for ensuring individuals have the appropriate access to ...

  • fraud detection

    Fraud detection is a set of activities undertaken to prevent money or property from being obtained through false pretenses.

  • single sign-on (SSO)

    Single sign-on (SSO) is a session and user authentication service that permits a user to use one set of login credentials -- for ...

  • 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, ...

  • core competencies

    For any organization, its core competencies refer to the capabilities, knowledge, skills and resources that constitute its '...

  • Workday

    Workday is a cloud-based software vendor that specializes in human capital management (HCM) and financial management applications.

  • recruitment management system (RMS)

    A recruitment management system (RMS) is a set of tools designed to manage the employee recruiting and hiring process. It might ...

  • core HR (core human resources)

    Core HR (core human resources) is an umbrella term that refers to the basic tasks and functions of an HR department as it manages...

Customer Experience
  • 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.

  • customer profiling

    Customer profiling is the detailed and systematic process of constructing a clear portrait of a company's ideal customer by ...