Introduction to Types of Shell

Introduction to Types of Shell

3 mins read14.6K Views Comment
Updated on Jan 25, 2023 11:21 IST

Author: Kanika Joshi

Shell is an interface between the operating system and the user. The primary responsibility of the shell is to collect the user’s input and execute the program on the operating system based on that input. Then it displays the output obtained after the execution of the program.
Shell manages the resources in the system, it provides an environment for running programs, shell scripts, and commands in the computer system.

2022_09_MicrosoftTeams-image-68.jpg

There are various types of shells and each one is popular for its own set of commands and functioning. With the help of a shell, we are able to interact with the kernel of the system. The kernel is also known as the heart of the operating system. Kernel helps the users in using utilities offered by the operating system. 

Originally, the Unix shell was written by Stephen R. Bourne in the mid-1970s at AT & T Bell Labs. Bourne shell is said to be the first shell, later it has multiple sub-categories.

Types of Shell

The shell is mainly of two types, then these two types are further categorized; types of shell are:

  • Bourne Shell
    • Bourne shell (sh)
    • Korn Shell (ksh)
    • Bourne Again shell (bash)
    • POSIX shell (sh)
  • C Shell

Bourne Shell:

Bourne shell is known as the first shell to be introduced, it is represented by “sh”. This shell got popular because of its quite compact nature. It was made the default shell for the SOLARIS operating system and was used as a Solaris administration script. It has very high-speed operations. 

Must Check: Introduction to R Programming for Data Science

Bourne’s shell was not able to handle logical and arithmetic operations. It was less interactive because of the lack of comprehensive features. Also, it is not able to recall previously used commands.

  • Path Name: /bin/sh or /sbin/sh
  • Prompt for the root user: #
  • Prompt for the non-root user: $

Korn Shell:

This shell was developed by David Korn in AT & T bells lab, this was introduced as an improved version or superset of the Bourne shell. It is represented by “ksh”. It has all the features and functionalities of Bourne Shell and also provides some new functionalities to the users. Korn shell has in-built support for arithmetic operations.  

  • Path Name: /bin/ksh 
  • Prompt for the root user: #
  • Prompt for the non-root user: $

Bourne Again Shell:

It is also known as Bash Shell, This shell combines features of the Korn shell and C shell. This shell was designed as an extended version of the Bourne shell. Bourne Again Shell can automatically load previously used commands and can be edited with the help of the arrow keys of the keyboard. 

Must Check: What is C programming?

  • Path Name: /bin/bash 
  • Prompt for the root user: bash-VersionNumber#
  • Prompt for the non-root user: bash-VersionNumber$

C Shell:

The C shell was designed by Bill Joy at the University of California. It is represented using “csh”. The C shell was designed with the purpose of supporting programming languages. It was specifically designed to support in-built features like solving arithmetic operations and syntax of programming languages like C. Unlike Bourne and other Linux shells, the C shell can maintain and history of previously used commands, and those commands can be used whenever required. 

You can also explore: How to Delete a File in Linux?

  • Path Name: /bin/csh 
  • Prompt for the root user: hostname#
  • Prompt for the non-root user: hostname%

Shell is the most important and powerful tool in the system. Without a shell, it’s impossible to utilize the system’s features and functionality to its fullest. Here in this article, we have discussed the basic types of shells available, there is numerous other types of shells present in Linux. 

About the Author

This is a collection of insightful articles from domain experts in the fields of Cloud Computing, DevOps, AWS, Data Science, Machine Learning, AI, and Natural Language Processing. The range of topics caters to upski... Read Full Bio