Chapter 2: Bash Introduction
Bash Introduction Day! 😄 I’m going to explain what Bash really is like we’re sitting together in Hyderabad, no fancy words, just clear simple English with examples, like a friend teaching another friend.
Imagine your computer is a very smart but shy robot. It only understands orders when you give them in a special language.
There are two ways to give orders to this robot:
- Clicking mouse → beautiful pictures, folders, buttons (this is called GUI – Graphical User Interface)
- Typing words → black screen with text (this is called CLI – Command Line Interface or Terminal)
Bash is the most popular language/teacher that listens to the words you type in the terminal and tells the computer what to do.
Full Name & Meaning
Bash = Bourne Again SHell
- “Bourne Shell” (old name = sh) was the first popular command-line language made in 1970s by Stephen Bourne.
- In 1989, Brian Fox made a better, free version for GNU Project → he called it Bourne Again Shell (funny name, right? Like “born again” but for shell 😄)
- So Bash = improved, modern, free, super-powerful version of the old sh.
Today (2026), Bash is the default terminal language on almost every Linux computer (Ubuntu, Fedora, Debian, Mint, etc.), many servers, cloud (AWS, Google Cloud), macOS (until recently it was default, now zsh is default but Bash still works), and even Windows (Git Bash, WSL).
What does Bash actually do? (Two big jobs)
- Interactive mode (daily chatting) You type one order → Bash runs it instantly → shows result → waits for next order This is what 90% of people do every day in terminal.
- Scripting mode (automation) You write 10–100 lines in a file → save as .sh → tell Bash “run whole file” → it does everything automatically without you typing again and again.
Bash vs Other Shells (quick simple comparison)
Many shells exist — like different apps for same job.
| Shell | Full name | Year | Default on | Special points | Who uses it today? |
|---|---|---|---|---|---|
| sh | Bourne Shell | 1977 | Very old systems | Very simple, very strict POSIX | Servers that need max compatibility |
| bash | Bourne Again Shell | 1989 | Most Linux, old macOS | Very powerful, lots of features, free | Almost everyone (you & me!) |
| zsh | Z Shell | 1990 | New macOS (since 2019) | Better auto-complete, themes, plugins | Developers who love customization |
| fish | Friendly Interactive SHell | 2005 | Not default anywhere | Super user-friendly, shows suggestions live | Beginners who hate typing mistakes |
| ksh | Korn Shell | 1980s | Some old companies | Good for scripting, similar to bash | Old enterprise systems |
Bash wins because:
- Everyone knows it
- Works everywhere
- Huge number of tutorials/books
- Most scripts on internet are written for Bash
Real Examples – Let’s see Bash in action right now!
Open your terminal (Ubuntu → Ctrl+Alt+T, macOS → Terminal, Windows → Git Bash or WSL)
Interactive examples (type one by one)
|
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# 1. Who am I? whoami # → webliance (or your username) # 2. Where am I right now? pwd # → /home/webliance (your home) # 3. Show date & time date # → Wed Feb 25 12:48:15 IST 2026 ← see? current time! # 4. List files (with colors & details) ls -la # 5. Make folder + go inside mkdir bash_class cd bash_class # 6. Come back home quickly cd ~ # ~ means "my home" — super shortcut! |
First tiny script example (automation magic)
- Create file:
|
0 1 2 3 4 5 6 |
nano welcome.sh |
- Paste this:
|
0 1 2 3 4 5 6 7 8 9 10 11 |
#!/bin/bash echo "Namaste Webliance from Hyderabad!" echo "Today is: $(date)" echo "You are learning Bash — very good choice! 🚀" echo "Your home is: $HOME" |
- Save (Ctrl+O → Enter → Ctrl+X in nano)
- Make it runnable:
|
0 1 2 3 4 5 6 |
chmod +x welcome.sh |
- Run it:
|
0 1 2 3 4 5 6 |
./welcome.sh |
Output something like:
|
0 1 2 3 4 5 6 7 8 9 |
Namaste Webliance from Hyderabad! Today is: Wed Feb 25 12:50:22 IST 2026 You are learning Bash — very good choice! 🚀 Your home is: /home/webliance |
See? You wrote a mini-program in 5 lines!
Why learn Bash in 2026?
- Automate boring work (backup files, rename 1000 photos, install software daily)
- Work on servers (99% of cloud servers use Linux + Bash)
- DevOps / CI/CD (GitHub Actions, Jenkins, Docker — all use Bash)
- Faster than clicking (once you practice)
- Looks cool & powerful 😎
- Free forever, no license
Quick Summary Table – Bash Introduction at a glance
| Question | Answer |
|---|---|
| Full name | Bourne Again SHell |
| Made by | Brian Fox (for GNU Project) in 1989 |
| Main job | Read commands → run programs → show results |
| Two modes | Interactive (type one by one) + Scripting (run .sh files) |
| Default on | Most Linux distros, servers, old macOS |
| File extension for scripts | Usually .sh (but not compulsory) |
| First line of every script | #!/bin/bash (tells computer: use Bash please) |
| Most important shortcut | ~ = your home folder |
| Best place to start practicing | Your own terminal + make small .sh files |
Got the big picture now? Bash is your command-line friend that can do simple tasks instantly or automate big boring jobs forever.
Next class — what do you want?
- “Explain first 10 most useful Bash commands with examples”
- “Show me more simple scripts for beginners”
- “What is .bashrc and how to customize terminal”
- “Bash vs Zsh – should I switch?”
Just say the topic — teacher is ready! 🐧😊
Keep typing in terminal every day — even 5 minutes — you’ll become fast very soon. All the best from Hyderabad! 🇮🇳
