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
  • firewall as a service (FWaaS)

    Firewall as a service (FWaaS), also known as a cloud firewall, is a service that provides cloud-based network traffic analysis ...

  • private 5G

    Private 5G is a wireless network technology that delivers 5G cellular connectivity for private network use cases.

  • NFVi (network functions virtualization infrastructure)

    NFVi (network functions virtualization infrastructure) encompasses all of the networking hardware and software needed to support ...

Security
  • virus (computer virus)

    A computer virus is a type of malware that attaches itself to a program or file. A virus can replicate and spread across an ...

  • Certified Information Security Manager (CISM)

    Certified Information Security Manager (CISM) is an advanced certification that indicates that an individual possesses the ...

  • cryptography

    Cryptography is a method of protecting information and communications using codes, so that only those for whom the information is...

CIO
  • B2B (business to business)

    B2B (business-to-business) is a type of commerce involving the exchange of products, services or information between businesses, ...

  • return on investment (ROI)

    Return on investment (ROI) is a crucial financial metric investors and businesses use to evaluate an investment's efficiency or ...

  • big data as a service (BDaaS)

    Big data as a service (BDaS) is the delivery of data platforms and tools by a cloud provider to help organizations process, ...

HRSoftware
  • talent acquisition

    Talent acquisition is the strategic process an organization uses to identify, recruit and hire the people it needs to achieve its...

  • human capital management (HCM)

    Human capital management (HCM) is a comprehensive set of practices and tools used for recruiting, managing and developing ...

  • Betterworks

    Betterworks is performance management software that helps workforces and organizations to improve manager effectiveness and ...

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

Close