Types of Shells in Linux

28/12/2020

Overview

In this lesson, we will study the types of shells available in Linux and what advantages one shell offers over another. Shells are not always helpful and one shell can be much better than another as evolution of shells is ongoing. Let’s study about shells in detail now.

What are shells?

A shell is an interpreter where we can provide commands and get a response. Shells can perform powerful and uncountable number of actions based on the commands we provide. Basically, a Shell is a program which runs other programs.

Let’s look at a quick peek on the type of shells here:

It all began at Bell Labs when Thompson Shell released first shell environment. From then, shells have always evolved.

Types of Shells

Let’s study different kind of shells with their features, functionalities and speed of executions.

Bash Shell

Bash is a Unix shell. It was created as a substitute for Bourne shell and include much more scripting tools than Bourne shell like the csh and ksh shells.

Bash is a very common shell and you actually might be running it by default on your machine. It is almost always available on all Linux distributions. One of the contender to Bash shell is dash which is becoming more popular by the Ubuntu project.

Zsh Shell

Zsh shell is 100% compatible with bash. This means that whatever scripts run on Bash runs on Zsh shell exactly the same. To add, Zsh shell includes more features.

Most common features in Zsh shell are spelling correction, intelligent command-line completion, pluggable modules that increase shell capabilities, aliases with global access that allow a user to alias file names or anything else instead of just commands and much better theming support.

Even better feature in favor of Zsh shell is that if a user is known to Bash shell, it is very easy to switch to Zsh shell without getting used to a different syntax.

Csh Shell

Csh is an improved C shell. It is most popular in terms of a login shell and shell command interpreter. Most favorable features of this shell are:

  • Syntax similar to C
  • Control over jobs
  • Intelligent spell correction
  • Command-line editor
  • Filename completion

Why Csh is not highly recommended?

The only (and big) problem with Csh shells are that they can create many issues when it comes to Scripting.

There might not be any exact reasons on why you shouldn’t use it as an interactive shell. Usually, a user will find its use a little confusing as you need to learn to use different shells. It is always better to use a single shell when you are doing many things at once.

More shells

The other candidates for interactive shells are dash, ksh and zsh shells. All of these shells follow the posix standards with some extra features. My personal favorite has always been the bash shell.

Conclusion

We studied some most popular Linux shells and recommend one of them which offers the most features. It is always a pick related to personal preference.  Tweet us your favorite shell @linuxhint.

ONET IDC thành lập vào năm 2012, là công ty chuyên nghiệp tại Việt Nam trong lĩnh vực cung cấp dịch vụ Hosting, VPS, máy chủ vật lý, dịch vụ Firewall Anti DDoS, SSL… Với 10 năm xây dựng và phát triển, ứng dụng nhiều công nghệ hiện đại, ONET IDC đã giúp hàng ngàn khách hàng tin tưởng lựa chọn, mang lại sự ổn định tuyệt đối cho website của khách hàng để thúc đẩy việc kinh doanh đạt được hiệu quả và thành công.
Bài viết liên quan

30 bash script Interview questions and answers

Bash scripting is a very useful and powerful programming language that is mainly used to make any manual task automated....
29/12/2020

Bash History Search

We need to type various commands in the shell for various purposes. Sometimes we need to execute same commands multiple...
29/12/2020

How to Handle Command Line Arguments in a Bash Script

In many cases, bash scripts require argument values to provide input options to the script. You can handle command line...
29/12/2020
Bài Viết

Bài Viết Mới Cập Nhật

Reliable IPv4 and IPv6 Subnet Rental Services: The Perfect Solution for Global Businesses
23/12/2024

Tìm Hiểu Về Thuê Proxy US – Lợi Ích và Cách Sử Dụng Hiệu Quả
11/12/2024

Mua Proxy V6 Nuôi Facebook Spam Hiệu Quả Tại Onetcomvn
03/06/2024

Hướng dẫn cách sử dụng ProxyDroid để duyệt web ẩn danh
03/06/2024

Mua proxy Onet uy tín tại Onet.com.vn
03/06/2024