Jan31
What's In A Shell?

What’s In A Shell?

One of the main features of Linux as an operating system is its flexibility. The system is designed to be modular, and various parts of the operating system can be swapped for others to meet the user’s needs. One of the most recognizable elements of the operating system is its user interface. Most people who have used Linux will know that Linux distributions offer quite a variety of graphical user interfaces. What tends to get missed is that there are many different command line interfaces, also known as shells, available too.

Bash

The most commonly used shell is the Bourne Again Shell, or bash. It was designed for the GNU project to be an open source replacement for the Bourne Shell, which was a commonly used shell on UNIX systems. Bash also took inspiration from some other UNIX shells, such as the C shell (csh) and KornShell (ksh). Each of the main UNIX shells excelled at different things: the Bourne Shell was easy to script for, and whilst the C shell required knowledge of the C programming language to script for, it did provide some handy tools that made it better for interactive usage. Bash combined this improved interactivity with the simple scripting of the Bourne Shell.

While bash became the default shell for Linux systems – and still is for most distributions – it hasn’t stopped projects starting for alternative shells where it’s felt that improvements can be made.

Ash & BusyBox

One such shell is the Almquish shell, or ash. This shell is designed to be compatible with the Bourne shell, and to be so in a lightweight fashion. In doing this it lacks a number of the advancements that shells like bash, ksh and csh have. Its small size and low resource usage means it’s commonly used in embedded systems such as those using the BusyBox system. BusyBox is commonly used on Android devices for their shell as well as often being used as part of the Linux installer and boot process. This means that should something go wrong installing or booting your Linux system, you’ll likely find yourself within BusyBox working with the Almquish shell. There is also a port called dash (Debian Almquish shell) from where ash was ported to Debian Linux. Dash is the default shell for the /bin/sh command on Debian and Ubuntu systems.

Z Shell

Z shell, or zsh, is another shell based on the Bourne shell. It also adds a number of features from bash, ksh and csh. On top of this, it boasts improved command line completion recognizing not just command names but also options and arguments, and spelling correction. It is also extendable using themes and plugins and is capable of running in a compatibility mode that enables it to act just like certain other shells such as the Bourne shell. With regards to the plugins and themes, there’s a handy tool that can help you find and install them from your command line making it really easy to set up. With all these features Z shell has become a popular replacement for bash.

Fish

We’ll finish off by mentioning fish, the friendly interactive shell. It’s designed, as the name implies, to make the command line a friendlier place. As such, fish has a number of features to make working at the command line easier, such as syntax highlighting and error checking, making use of colors to make things easier. There are also automatic suggestions to complete commands as you type them, along with tab completion. Downsides are that it is not compatible with the Bourne shell, so while it’s a good start for beginners, there are a number of non-transferable elements when it comes to moving to another shell, such as the fact it uses its own scripting language.

The various shells offer you slightly different ways of working and are all available to install from your Linux distributions default repositories. It’s worth spending some time having a play with them and getting an idea of the differences; maybe one might tempt you away from bash.

This article was brought to you by VPS.net, for dedicated server hosting, cloud servers and 24/7 support visit our site here vps.net

No Comments

over 200,000 servers launched

and counting worldwide...

‚Äč