Skip to content
Learn Netverks

Lesson

Step 1/36 3% through track

intro

Introduction to Bash

Last reviewed May 28, 2026 Content v20260528
Track mode
none
Means
Read / quiz
Reading
~3 min
Level
beginner

This lesson

An orientation to the Bash track—how read-focused terminal practice works, core shell vocabulary, and what you will automate next.

You need a clear map of the Bash track so quoting, exit codes, pipes, and shell scripts do not feel like magic.

You will apply Introduction to Bash in contexts like: CI jobs, server maintenance, local dev automation, and Git hooks.

Read each lesson, copy bash examples into your own terminal, and complete the lesson MCQs—there is no in-browser runner for security reasons. Also read the interview prep blocks.

Alongside Git and Tools—after you can navigate a terminal; Python helps for heavier logic than shell alone.

How this Bash track works

  • Read-focused — no in-browser runner — copy commands into your own terminal (macOS Terminal, iTerm, WSL, or Linux). There is no playground Run button by design (execution_profile: none).
  • Shell automation focus — variables, quoting, pipes, scripts, cron, SSH, Git hooks, and CI glue. Pair with the Git track and Tools; compare scripting depth with Python.
  • Prerequisites — basic computer literacy; Intro to Programming or any language track helps. Finish Git intro before hooks/CI lessons.

Practice in a ~/bash-practice folder. Never run destructive commands on system paths. GNU/Linux and macOS flags may differ—check --help on your OS.

Install on your device (macOS, Linux, Windows)

Use your system terminal—no extra install on macOS/Linux. Windows users should enable WSL or Git Bash.

macOS

  1. Open Terminal or iTerm—bash/zsh is preinstalled.
  2. Create practice dir: mkdir -p ~/bash-practice && cd ~/bash-practice

Linux

  1. Open your distro terminal—bash is default on most images.
  2. mkdir -p ~/bash-practice && cd ~/bash-practice

Windows

  1. Recommended: WSL2 (wsl --install) then Ubuntu bash.
  2. Alternative: Git Bash from Git for Windows.

Verify: bash --version and echo hello in your terminal.

Bash (Bourne Again SHell) is the default command language on most Linux servers and macOS terminals. It lets you run programs, chain commands with pipes, automate tasks with scripts, and glue together the tools in your dev environment.

How this track works

This is a read-focused track: there is no in-browser runner. Copy each example into your own terminal (Terminal.app, iTerm, WSL, or a Linux console). Compare workflows with the Git track, editor and CLI habits in Tools, and scripting patterns in Python.

After Python, you already know variables and control flow—Bash applies those ideas to files, processes, and the operating system.

What you will learn

  • Shell basics: commands, variables, quoting, control flow, functions, exit codes
  • Files and text: paths, permissions, redirection, pipes, find, grep, text tools
  • Scripting: arguments, arithmetic, arrays, parameter expansion, error handling
  • DevOps glue: cron, environment variables, SSH, Git hooks, CI scripts
  • Advanced topics: subshells, processes, xargs, bash vs sh, security habits

Safety note

Run examples in a practice folder you create. Avoid reckless rm -rf on broad paths. When a lesson shows destructive commands, read the path twice before pressing Enter.

Important interview questions and answers

  1. Q: What is Bash used for?
    A: Running commands, automating file tasks, deploying software, and connecting CLI tools in development and operations.
  2. Q: Why no playground runner?
    A: Shell access on a shared server is a security risk—copy-paste into your local terminal is the safe default for this track.

Self-check

  1. In one sentence, what does a shell do between you and the OS?
  2. Name two other tracks that pair well with Bash.

Challenge

Try Bash in your terminal

  1. Open your system terminal.
  2. Run echo "Bash track ready".
  3. Run bash --version and note the version line.

Done when: you see your echo text and a bash version string.

Tip: Finish Tools and Git intros—Bash ties the terminal, version control, and automation together.

Interview prep

What is Bash in one sentence?

A command shell and scripting language for automating CLI tasks and gluing Unix tools.

Why is this track read-focused?

Running shell on a shared server is unsafe; learners copy commands into their own terminal.

Interview tip Lesson completion confidence

Can you explain this lesson in 30 seconds without reading notes?

Not saved yet.

Check yourself

Multiple choice — immediate feedback.

Discussion

Past discussion is visible to everyone. Only logged-in users can post comments and replies.

Starter discussion topics

  • Why learn Bash?
  • Local terminal ready?

Sign up or log in to post comments and sync lesson progress across devices.

No discussion yet. Be the first to ask a question.

Jump