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

BASH command output to the variable

Different types of bash commands need to be run from the terminal based on the user’s requirements. When the user runs...
29/12/2020

Cài đặt Prometheus trên CentOS 7

Prometheus là một trong số các công cụ dùng để giám sát rất hữu ích hiện nay. Dưới đây sẽ là...
28/09/2021

Associative array in Bash

An array variable is used to store multiple data with index and the value of each array element is accessed by the corresponding...
29/12/2020
Bài Viết

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

Mua proxy v4 chạy socks5 để chơi game an toàn, tốc độ cao ở đâu?
18/05/2024

Thuê mua proxy Telegram trọn gói, tốc độ cao, giá siêu hời
18/05/2024

Thuê mua proxy Viettel ở đâu uy tín, chất lượng và giá tốt? 
14/05/2024

Dịch vụ thuê mua proxy US UK uy tín, chất lượng số #1
13/05/2024

Thuê mua proxy Việt Nam: Báo giá & các thông tin MỚI NHẤT
13/05/2024