- Bare Metal
- Bare Metal Cloud
- Big Data Benchmarks
- Big Data Experts Interviews
- Big Data Technologies
- Big Data Use Cases
- Big Data Week
- Data Lake as a Service
- Dedicated Servers
- Disaster Recovery
- GoTech World
- Industry Standards
- Online Retail
- People of Bigstep
- Performance for Big Data Apps
- Press Corner
- Tech Trends
- What is Big Data
Top 5 Linux Shells and How to Install Them
The shell is an interactive interface that allows users to execute other commands and utilities in Linux and other UNIX-based operating systems. When you login to the operating system, the standard shell is displayed and allows you to perform common operations such as copy files or restart the system.
Linux shells are a lot more powerful than the Windows command line, because they function as a scripting language as well, with a complete set of tools. Multiple shells can be installed on a system and it is possible to quickly switch between them. Every shell comes with its own syntax and scripting features, let’s discuss the most common options and how to install them on a Cent OS 7 server.
Bash, or the Bourne-Again Shell, is by far the most widely used choice and it comes installed as the default shell in the most popular Linux distributions. It was developed from the original UNIX Bourne shell (also known as sh) and was designed to be fully compatible with the old scripts, while adding multiple improved features.
Bash is a very solid shell option, since it has been used for a long time and there is ample documentation for it. In fact, most online tutorials will assume that you’re using bash.
As a result, it is recommended for most users and works great for most common system administration tasks. However, if you need more powerful scripting options or other advanced tools, it is time to explore some of the newer shells available.
Zsh or the Z-shell was designed from the onset to be interactive and incorporate some of the best features of older shells. It provides unique scripting features, it is highly customizable and is easy to use, with spelling correction, command completion or filename globbing.
Installation on CentOS is very easy, with a single command:
yum install zsh
You can now launch the new shell, with the zsh command, you’ll notice a small change in the way the prompt looks:
Keep in mind that you should configure zsh before using it in order to benefit from its most powerful features. Several open-source frameworks, such as oh-my-zsh, are available for even more customization options and plugins.
KornShell (also known as ksh) is a very old bash alternative that has been developed in the 1980s. It is very similar to bash but doubles as a complete and powerful programming language, so it has a number of passionate fans among sysadmins. It is not widely used, so it’s a bit more difficult to find online documentation or help.
Installation and launch are again very simple in CentOS:
yum install ksh
Tcsh is a better version of the C shell (csh), which was developed in the UNIX era. It is favored by programmers because its syntax is very similar to the C programming language, so they can use its scripting features without having to learn bash. It is also the default shell in operating systems from the BSD family.
It offers several other useful features, such as job control, a command-line editor or a configurable command-line completion tool. Tcsh is installed with yum from the standard repositories.
Fish, or the friendly interactive shell, aims to be simpler to use and more user friendly than its competitors. It is a great choice for Linux beginners, because it uses colors to help the user. For example, commands with incorrect syntax are displayed in red, while correct ones are blue.
In addition, fish provides very useful auto-complete suggestions and even parses the man pages of any new installed package and suggests command completions based on them.
Run the following commands to install Fish in CentOS7:
cd /etc/yum.repos.d/ wget http://download.opensuse.org/repositories/shells:fish:release:3/RHEL_7/shells:fish:release:3.repo yum install fish
You can now launch the new shell:
Which of these shells is the best? That depends on your actual use case. Bash is a great all-rounder, with excellent documentation, while Zsh adds a few features on top of it to make it even better. Fish is amazing for newbies and helps them learn the command line. Ksh and Tcsh are better suited for advanced users, who need some of their more powerful scripting capabilities.
Managed Services Offer
If you need help in installing, configuring, monitoring, and troubleshooting your server infrastructure for your project, our sysadmins are here to help. They can provide specialized knowledge at a fraction of the cost of hiring a specialist internally.
And if you choose Bigstep Advanced Managed Services, you get up to 50% discount on high performance bare metal servers. Learn more about our offer here.
About the Author
Dragos Baldescu is a Level 2 Technical Support Engineer at Bigstep, passionate about Linux and testing out new technologies and solutions.