What is Bash and how does it differ from the Linux terminal?
Published on 2026-10-20 by frfrand
Bash explained from scratch: shell, terminal, commands, pipes, scripts, variables, and errors worth avoiding on a server.

Short answer: Bash is a shell: a program that interprets commands and allows you to control the operating system by typing commands. Its name comes from Bourne-Again Shell. In Linux it is used both for interactive work and for automating tasks through scripts.
The common confusion is thinking that Bash and the terminal are the same thing. They are not: the terminal is the interface where you type and see results; Bash is one of the programs that can interpret what you type.
The counter example
Imagine a coffee shop. The counter is where you place your order; the person who understands the order and transmits it to the kitchen performs another function. The terminal would be the counter and the shell would be the interpreter that processes your instructions.
This explains why you can change the terminal application without changing Bash, or use another shell such as Zsh or Fish in the same terminal.
What can I do with Bash?
From a shell you can navigate folders, examine files, launch programs, combine commands, and define variables.
For example, pwd shows the current directory, ls lists files, and cd changes directory. Commands do not all work the same way: some are internal shell functions and others are external programs searched for in the configured paths.
Having a terminal open does not automatically grant administrator privileges. Sensitive operations remain subject to permissions and authentication.
What is a Bash script?
A script is a file that gathers instructions to execute a task. For example, if you need to prepare a folder, check a file, and record a result, you can write the steps and execute them in a repeatable way.
A simple and non-destructive example:
#!/usr/bin/env bash
echo "Preparando informe"
date
pwd
The shebang on the first line helps indicate which interpreter should execute the script in compatible environments. You can also invoke it explicitly with bash archivo.sh.
Automation saves time, but a wrong script can also repeat errors many times. That is why it is advisable to test it with sample data.
What are pipes?
A pipe connects the output of a command with the input of another using the | symbol. For example, you can filter a list of results without saving intermediate files.
It is one of the most powerful ideas in Unix-like systems: small tools can be combined to solve more complex tasks.
But be careful: not all outputs are intended to be read automatically by a program. Some tools offer structured formats that are preferable to use in stable automations.
Why do quotes matter?
Bash expands variables and interprets spaces and special characters. A file name containing spaces can end up split into several arguments if it is not properly quoted.
The difference between "$archivo" and $archivo can be important. You should also avoid building commands from untrusted text without control, especially when using tools like eval.
Do not copy scripts found on the Internet and run them as root without reading them: they can modify permissions, delete information or install unexpected programs.
Bash vs Python: which one is better?
Bash is often useful for combining system commands, inspecting files and automating short steps. Python can be more convenient for complex logic, data processing and large programs.
There is no universal winner. If a Bash script starts to have many conditions and transformations that are difficult to maintain, it may be a sign that another tool is more suitable.
What about Bash on a server?
On a Linux VPS it is common to use Bash via SSH to review services, files and logs. Understanding the differences between terminal, shell and permissions helps diagnose problems without installing a graphical interface.
In ArduMaker, the web terminal in the panel opens a Bash console of your VPS in the browser. It is persistent (runs inside tmux), so what you left running stays there even if the connection is cut. An administrator chooses which Linux user to log in with (by default, root); a Company member logs in with their own user, without root. Commands from a deploy or a scheduled task also end up executing on the VPS: even if you automate operations from the panel, understanding Bash is still useful to know what is being executed and why.
In short: Bash interprets commands and also serves as a scripting language. The terminal is the window; the shell is the one that understands your instructions.
Frequently asked questions
Are Bash and sh the same?
No. sh is the POSIX shell, more basic; Bash is compatible with it but adds its own functions (arrays, [[ ]], extra expansions). In Ubuntu and Debian, /bin/sh points to dash, not Bash, so a script with #!/bin/sh that uses Bash functions may fail.
How do I know which shell I am using?
echo $0 shows the shell of the current session. echo $SHELL shows the login shell configured for your user, which does not always match the one you are using at that moment.
Official source: GNU Bash Manual · What is the terminal.
