100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace
Linux & Shell Scripting
30 minbeginner

Distributions, Shells and the Terminal

Every interaction a DevOps engineer has with a Linux system begins at the shell — a program that accepts text commands, translates them into system calls, and returns output. Understanding what a shell actually is, how it differs from the terminal emulator that hosts it, and why different distributions ship with different default shells eliminates an entire class of script compatibility bugs.

The most common production failure caused by shell ignorance is a script written in Bash that behaves differently on a server where `/bin/sh` is linked to Dash — because the script uses Bash-specific syntax but declares `#!/bin/sh`. This lesson establishes the mental model: kernel → shell → terminal emulator → distribution, so each layer is clear before you write your first script.

Analogy🏏Cricket
🏏 Think of it like cricket: The match itself is the kernel — real computation at the hardware level. The commentators translating that action into words for the audience are the shell: they take raw events and present them in a form humans can understand and interact with. The television set in your living room is the terminal emulator: it displays the commentary but does not participate in the match.Just as switching from one broadcaster to another changes commentary style but not the underlying match, switching between Linux distributions changes shell defaults and package manager but not the kernel. Just as Star Sports and Sony Six both cover the same IPL match with different graphics packages, Ubuntu and Alpine both run the same kernel with different userspace tools.The insight is that these layers are genuinely separate, which is why you can swap any one of them independently.
Lesson 2 of 40
0% complete