Skip to content

Introduction to Bash

Bash (Bourne Again SHell) is a command processor that typically runs in a text window where the user types commands that cause actions. It can also read commands from a file, called a script.

terminal.png

Key Features

  • Command Line Interface (CLI): Bash provides a command line interface to interact with the operating system.
  • Scripting: Bash allows you to write scripts to automate tasks.
  • Job Control: Bash supports job control (background jobs, job suspension, and more).
  • History: Bash maintains a history of the commands you have entered, allowing you to easily repeat or modify previous commands.

Getting Started

To get started with Bash, open a terminal on your Unix-like operating system (Linux, macOS, etc.). You can also install a terminal emulator on Windows, such as Git Bash or Windows Subsystem for Linux (WSL).

Verify that you are using the Bash shell by running the following command:

echo $SHELL

exec_echo_shell.png

If the output is /bin/bash, you are using the Bash shell. If you are not using Bash, you can switch to it by running:

bash

exec_bash.png

Now you are using the Bash shell.

Basic Commands

To continue learning about Bash, explore the Basic Bash Commands section.

Advanced Commands

If you want to learn advanced Bash commands, check out the Advanced Bash Commands section.