💻

Windows CLI Overview

Jul 19, 2025

Overview

This lecture introduces the main command line interfaces in Windows, explains basic file system navigation using PowerShell, and discusses common directory structures and commands.

Windows Command Line Interfaces

  • Windows offers two main CLIs: Command Prompt (cmd.exe) and PowerShell (powershell.exe).
  • Command Prompt is similar to the old MS-DOS interface.
  • PowerShell supports most Command Prompt commands and adds more advanced features.
  • PowerShell commands often use aliases, which are nicknames for commands.

Basic File System Navigation with PowerShell

  • To open PowerShell, search for it in your applications list and launch the program.
  • The ls command (alias for list directory) is used to display files and folders.
  • Parameters are values passed to commands to modify their behavior (e.g., specifying a path).
  • The root of the C drive is referred to as the parent directory; directories within it are child directories.
  • Example: In a folder named "dogs" with a subfolder "corgi," "dogs" is the parent and "corgi" is the child.

Common Directories in Windows C Drive

  • Program Files and Program Files (x86): Store installed applications.
  • Users: Contains user profile directories (home directories).
  • Windows: Contains the Windows operating system files.
  • ProgramData: Used by programs to store data.

Using PowerShell Help Features

  • get-help ls: Shows a summary of the ls command parameters.
  • get-help ls -full: Displays detailed help with descriptions and examples for each parameter.

Viewing Hidden Files and System Files

  • ls -force: Lists hidden and system files not shown by default.
  • Recycle Bin: Hidden directory where deleted files are temporarily stored.

Key Terms & Definitions

  • Command Line Interface (CLI) — A text-based way to interact with the operating system using commands.
  • PowerShell — An advanced Windows CLI with scripting capabilities.
  • Alias — A nickname for a command.
  • Parameter — An additional value given to a command to modify its action.
  • Parent Directory — A folder containing other folders (child directories).
  • Child Directory — A folder located inside a parent directory.

Action Items / Next Steps

  • Practice opening PowerShell and listing directories using ls.
  • Use get-help ls and get-help ls -full to explore command parameters.
  • Try ls -force to view hidden and system files in the C drive root.