Bash and the Linux Shell - 01 - Getting Introduced To Bash

Published: 2021 December 05

Last edited: 2023 October 13

system administration Linux Bash

Series

This is part a series about Bash and the Linux Shell.

In this first post, we’ll look at what Bash is and what it’s useful for.

Introduction to Bash

When you think of someone expertly working with a computer you might picture them stereotypically entering commands on a black screen with green text, the computer responding with rapidly scrolling walls of text.

For a long time I didn’t realize the thing they were typing in was called a shell. (The differences between a terminal, console, command line, and shell are nuanced. Many of the responses to this StackExchange question offer some helpful insight and perspective on the topic.)

Nor did I realize that on Linux and many other systems that shell was likely to be a specific program called Bash.

What is Bash?

According to Christian Cawley on MakeUseOf.com:

"[Bash] is by a mile the most popular shell among Linux users. It’s hard to even think about shells without the Bourne-Again Shell (bash) being a part of the equation. Many Linux distributions ship with bash as the default shell because bash is the default GNU shell. Released in 1989, it also boasts a few decades of healthy development behind it."

And courtesy of Wikipedia’s article for Bash:

“Bash is a Unix shell and command language”

And the Wikipedia article for shell:

“In computing, a shell is a computer program which exposes an operating system’s services to a human user or other programs. In general, operating system shells use either a command-line interface (CLI) or graphical user interface (GUI), depending on a computer’s role and particular operation. It is named a shell because it is the outermost layer around the operating system."

And from Ubuntu’s tutorials:

The Linux command line is a text interface to your computer. Often referred to as the shell, terminal, console, prompt or various other names

So, Bash is a popular tool created by the GNU project for interacting with your computer via text commands that is likely already on (or at least available for) your computer.

Why learn to work with Bash?

As Talha Saif Malik points out:

“If you want more control over your OS and want to perform different OS related tasks then bash is your way to go. By bash, we don’t only refer to the scripting language but also to the tools that come with Linux operating system. Every single tool on Linux has its work and each performs a different task individually. Bash is really useful whenever you need to combine all those tools and chain them together in such a way that they all work in harmony to accomplish a task which is really difficult to do otherwise. For example, anything that has something to do with the Linux OS can also be done in other programming languages such as Python or Perl but it’s very hard to accomplish different OS-related tasks."

He continues:

“Bash is really useful to perform tasks around different tools and processes with the ability to combine different processes together and make all of them work towards a single goal. Bash is really handy when it comes to dealing and manipulating the inputs and outputs which is a really difficult thing to do in other general-purpose programming languages such as python, C, etc."

And since Bash can be found in so many operating systems, it’s a broadly useful tool that is readily accessible.

Getting started with Bash and the Linux shell

To get started using Bash and the Linux shell, proceed to our next post about Getting Started with The Basics of Bash and the Linux Shell.

Or, if you want to learn about Bash and the Linux Shell generally, review our Bash and the Linux Shell topic page.

Copying Directory Structure With a Bash Script - With Help From ChatGPT AI

Published: 2024 January 22

Setting Up a Raspberry Pi as a Linux Print Server with CUPS

Published: 2024 January 19

Setting Up a Raspberry Pi Zero 2 W with Ubuntu Server

Published: 2024 January 04