Posts

Showing posts with the label Terminal fundamentals

Tutorials: Linux Shell 101: Understanding Streams, Permissions, and the Mythical $PATH

Image
1. The Classic Confusion: Terminal vs. Shell Many developers use these terms interchangeably, but they are completely different components: The Terminal (Terminal Emulator): This is just the graphical window (the visual application, e.g., Gnome Terminal, Alacritty, Tilix ). Its only role is to display text and catch your keystrokes. The Shell: This is the invisible "brain" running inside the console (e.g., Bash, Zsh ). It receives the text you type, interprets it, looks for the corresponding program in the system, executes it, and returns the result to your screen. 2. Standard Input/Output Streams (I/O Streams) In Linux, absolutely everything is treated as a file, including the text entering and exiting a command. Every program started in the shell automatically opens 3 data streams: stdin (Standard Input - Descriptor 0): The data input stream (usually your keyboard). stdout (Standard Output - Descriptor 1): The standard output stream where the program displays its succ...