Skip to content
Related Articles

Related Articles

Shell Scripting – Difference between Korn Shell and Bash shell

View Discussion
Improve Article
Save Article
Like Article
  • Last Updated : 13 Jun, 2022

Korn Shell: Korn Shell or KSH was developed by a person named David Korn, which attempts to integrate the features of other shells like C shell, Bourne Shell, etc. Korn Shell allows developers to generate and create new shell commands whenever it is required. Korn shell was developed a long year back as it is older than the BASH shell and it has fewer resources and has a limited scope of computer users. There are various versions of Korn as pdksh, mksh, ksh93, and many more. There is the print command in Korn shell to print the message in the terminal which is better than echo in Bash Shell.

Bash Shell: Bash or Bourne Again Shell is the identical similar shell to Bourne or .sh in Unix. Bash shell was developed by the Freeware Software and it is written and licensed under the GNU organization. This is the reason to make the Bash shell a public domain shell. Bash shell is free and open-source to use for computer users. Some useful features of Bash shell are tab completion and setting a prompt to display the current directory. We can run the syntax of the other shell in Bash Shell without any problem. Bash Shell is a more recently developed shell by comparing it to other shells with lots of resources and features.

Table of Difference between Korn Shell and Bash Shell

Korn Shell

Bash Shell

The script extension of the KSH shell is .kshThe script extension of the Bash shell is .sh
The path of the Korn shell in the directory structure is /bin/ksh.The path of the Bash shell in the directory structure is /bin/sh.
Approximately the Binary size of the Korn Interpreter is somewhere 1.6 MB.Bash interpreter has a binary size of 1.1 MB.
Korn shell uses the print command to print the message in the terminal.Bash shell uses the echo command to print the message in the terminal.
Korn shell has better support to loop handling as compared to the Bash shell.Bash shell can also handle loops better but not to the mark as compared to Korn shell
The Korn shell is developed by David Korn and it’s older than the Bash shell.Bash shell is developed by Freeware Software Foundation and it is a newly created shell as compared to the Korn shell.
There is less number of users using the Korn shell and the community is also less as compared to the Bash shell.Bash shell consists of a large number of active users and has a large community.

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!