Understand the interface boundary between Terminal Emulators and Shell Interpreters (including Windows Terminal vs. PowerShell vs. CMD).
Master File System path tracking, hidden dotfiles, and essential CLI utilities.
Map system execution paths via global and local environment configurations.
Terminal: The visual GUI wrapper. A window application that captures keyboard strokes, handles GPU text rendering, and manages tabs/panes.
Shell: The command interpreter engine running inside the terminal. It evaluates text strings, processes scripts, issues system calls (syscalls
), and interacts with the OS Kernel.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β WINDOWS TERMINAL GUI (The Visual Interface Window) β
β β β
β βββββΊ Tab 1: [ PowerShell Core Engine (Modern) ] β
β βββββΊ Tab 2: [ Command Prompt Engine (Legacy) ] β
β βββββΊ Tab 3: [ WSL Ubuntu Linux Bash (Core) ] β
βββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββ
β Raw Text & Input Streams
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SHELL INTERPRETER (e.g., PowerShell / CMD) β
β βββββΊ Parses input string commands into system tasks β
βββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββ
β System Call (Syscall)
βΌ
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β OPERATING SYSTEM KERNEL β
β βββββΊ Interacts directly with underlying hardware β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
While both are Windows shells hosted inside Windows Terminal, they belong to entirely different computing eras:
Command Prompt ( cmd.exe): A legacy text shell maintained purely for backwards compatibility with 1980s MS-DOS. It pipelines data as
PowerShell ( pwsh.exe): A modern, cross-platform scripting engine. It pipelines data as
[ CMD APPROACH (Text Parsing Stream) ]
`dir` βββΊ Outputs text characters βββΊ Requires complex string filters to read metadata.
[ POWERSHELL APPROACH (Object Oriented) ]
`Get-ChildItem` βββΊ Outputs File Objects βββΊ Programmatically query: file.Size, file.Extension
Root ( / or C:): The absolute origin of the system storage hierarchy.
Absolute Path: Complete address starting directly from the system root.
C:\var\www\rextora\src\server.js
Relative Path: Conditional paths computed dynamically based on your current working location.
../config/.env
(moves up one directory level, then steps into the config folder).Hidden Files (Dotfiles): Administrative configuration layers starting with a period (.
). The OS restricts them from standard folder views by default to safeguard configuration states.
.env
, .gitignore
, .profile
.
[ C:\ ] (SYSTEM ROOT)
β
ββββββββββ΄βββββββββ
/bin /var
β
/www
β
/rextora βββ [ Absolute Start ]
β
ββββββββββ΄βββββββββ
/src /config
β β
server.js .env βββ [ Hidden File ]
β² β²
β β
βββββ( ../ )βββββββ βββ [ Relative Step ]
Direct textual manipulation of storage resources and active processes, completely bypassing graphical interfaces. These are the core commands a developer must know:
pwd
βββΊ Prints your current location: Displays the exact absolute path of the folder you are currently working inside.
ls
(or dir
on Windows) βββΊ Lists directory contents: Scans and shows all files and folders contained within your current path.
cd
βββΊ Changes your directory: Moves your terminal's active focus forward into a target folder or backward (cd ..
) to a parent folder.
mkdir
βββΊ Creates a new folder: Instantly allocates a brand-new, empty directory sector on your storage drive.
touch
(or New-Item
on Windows) βββΊ Creates a blank file: Drops a new empty file pointer (like app.js
or .env
) directly into your current directory.
cat
βββΊ Views file contents: Prints the raw text inside a file directly onto your screen without launching an external text editor.
rm
βββΊ Permanently deletes files/folders: Erases target files instantly, bypassing the recycle bin completely (rm -rf
forcefully purges entire folder branches).
[ Command Input ] βββΊ `mkdir -p src/api`
β
βΌ
βββββββββββββββββββββββββββββββββ
β DISK ALLOCATION β
β Storage Sector Partitioned β
β βββ src/ β
β βββ api/ β
ββββββββββββββββ¬βββββββββββββββββ
β
βΌ
[ Next Command ] βββΊ `touch src/api/index.js` (Creates empty file pointer)
$PATH
Variable Environment Variables: Global key-value pairs allocated inside RAM, enabling running applications to fetch setup states (like database credentials) cleanly outside source code files.
Real .env Example:
Ini, TOML
PORT=5000
DB_URL="mongodb://localhost:27017/rextora"
JWT_SECRET="supersecretkey123"
The $PATH Variable: A specialized system environment variable containing a colon-delimited string list of absolute directories where executable tool binaries live.
Real $PATH Example (Linux/Mac):
Bash
/usr/local/bin:/usr/bin:/bin:/opt/homebrew/bin
The Breakdown:
/usr/local/bin
: Where user-installed third-party tools live./usr/bin
: Standard system executables managed by the OS./bin
: Essential basic system utilities (like ls
, cp
, mkdir
)./opt/homebrew/bin
: Mac Homebrew installation binaries.
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β RAM ENVIRONMENT MEMORY BUFFER β
β β
β βββ PORT=5000 β
β βββ DB_URL="mongodb://localhost..." β
β βββ $PATH / Path Array: β
β [ /usr/local/bin ] βββΊ [ /usr/bin ] βββΊ [ /bin ] βββΊ [ /opt/homebrew ] β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
node
, the shell loops through every folder in your $PATH
array sequentially looking for node.exe
. If the tool path is absent from the list, the shell drops a "command not found"
/ "not recognized as an internal or external command"
exception.
[ USER TYPES COMMAND ] βββΊ e.g., "node app.js"
β
βΌ
[ SHELL INTERPOLATION ] βββΊ Shell parses input text.
β
βΌ
[ PATH DIRECTORY SCAN ] βββΊ Scans folders listed inside global Path:
β
βββββΊ Check 1: /usr/local/bin βββΊ [ Not Found ]
βββββΊ Check 2: /usr/bin βββΊ [ FOUND EXECUTABLE! ]
βββββΊ Skip remaining paths.
β
βΌ
[ KERNEL EXECUTION ] βββΊ Shell hands the executable binary to the OS Kernel.
β¨ Decoupled Runtimes: Terminal applications manage user interface styling; shell platforms evaluate code execution and issue system hooks.
β¨ Modern Shell Rule: CMD is legacy infrastructure. Rely strictly on PowerShell Core or Linux Bash for modern engineering workflows.
β¨ Binary Mapping: Applications are unreachable by standard command calls unless their parent directory is securely mapped inside the system's global $PATH
.
Terminal vs Shell: Visual wrapper environment (Windows Terminal) vs. logic parser interfaces (PowerShell, CMD, Bash).
CMD vs. PowerShell: Legacy text-based stream pipeline vs. modern object-oriented pipeline.
Paths: Absolute starts tracking directly from root (/
or C:\
); relative calculates offsets from where your terminal window is working right now.
Bin Lookups: The shell queries the systematic $PATH
variable map to safely trace and wake up program files stored across the hard drive.
Terminal vs. Shell: "The terminal is the monitor screen frame; the shell is the text engine processing logic inside that frame."
CMD vs. PowerShell: "CMD is a typewriter pushing raw text lines; PowerShell is a conveyor belt transporting rich data objects."
The $PATH Variable: