Dash vs Bash Shell

09.06.2020 10,504 0

The Dash vs Bash Shell comparison is getting very popular. Bash Shell is better known and it comes with most of the Linux distros by default, but Dash Shell has some different key features that are very attractive.

What is a shell?

We can’t talk about Dash vs Bash Shell without understanding what a shell is. It is an interface, a command-line, or a graphic interface that allows people to access the services inside an operating system (OS). Each command-line has its own syntax. There you have a list of commands written in a specific language. The word shell comes as a reference to the outside layer of the OS.

The shell is an application and uses the kernel API in the same way as the rest of the applications. This is why it is replaceable.

There are many options for Linux with differences in syntax, commands, speed, and capabilities.

What is Bash?

Bash is one of those shells with a command-line interface CLI. It was created by Brian Fox in 1989, more than 20 years ago, for the GNU Project. The goal was to provide a free replacement to the previously used Bourne shell. Now it is the default shell in many Linux distributions, older MacOS and is also available to current MacOS and Windows 10.

One very important characteristic of Bash is that it makes it possible to run scripts. You can create a code that can combine various commands and run it, instead of writing the commands one by one.

What is Dash?

Dash is another shell. The full name is Debian Almquist Shell. It is significantly smaller than Bash and, something very important, it is POSIX-compliant. It comes from the NetBSD of another shell called The Almquist Shell (Ash). It got its name in 1997. It is another application that interprets commands made for Linux.

It is the default shell in Ubuntu and many Debian-based Linux distros.

Dash vs Bash Shell

Dash

  • + Smaller and faster
  • + Free
  • + POSIX-compliant
  • + You can run scripts
  • Requires less disk space
  • Default on most Debian-based Linux distros.
  • Non-interactive
  • Fewer features

Bash

  • + Free
  • + Default on most UNIX systems
  • + Plenty of tutorials available on the internet
  • + Interactive
  • + Lots of commands
  • + Can run scripts
  • Not POSIX-compliant
  • Heavy and load slower than other shells

Should you completely change to Dash? It is not a straightforward answer. Think about what exactly you want it for. It can increase efficiency, but it can also break some functionality, depending on your previous use.

Leave a Reply

Your email address will not be published.