💻

Navigating Windows Command Line Interfaces

Jun 2, 2025

Command Line Interfaces (CLI) in Windows

Introduction

  • Windows provides two main CLI options:
    • Command Prompt (command.exe)
    • PowerShell (powershell.exe)
  • Command Prompt: Similar to the MS-DOS command prompt.
  • PowerShell: Supports more commands than the Command Prompt.

PowerShell

  • Chosen for exercises due to its extensive command support.
  • Many PowerShell commands are aliases for commands in other shells.

Getting Started with PowerShell

  • Accessing PowerShell:
    • Search for PowerShell in the applications list and launch it.
  • Using PowerShell commands:
    • ls command: Used to list files and directories.

Working with Directories

  • Root of C Drive:
    • The main hard drive where the Windows OS is installed.
    • You may see different directories depending on your computer's use.
  • Directory Hierarchy:
    • Parent Directory: Main directory containing other directories (e.g., root folder of C drive).
    • Child Directory: Sub-directory within a parent (e.g., directories within the root folder).
  • Example:
    • Folder named Dogs is a parent, and a folder named Corgi inside it is a child directory.

Common Directories in C Drive

  • Program Files (x86): Contains installed applications and programs.
  • Users: Holds user profile directories; each user has a separate directory.
  • Windows: Contains the Windows OS installation.

PowerShell Command Help

  • get-help ls: Provides a brief summary of ls command parameters.
  • get-help ls -full: Detailed description and examples of ls command parameters.

Viewing Hidden Files

  • ls -force: Shows hidden and system files not visible with just ls.
  • Important Hidden Directories:
    • Recycle Bin: Where deleted files are moved to instead of immediate deletion.
    • Program Data: Stores data for installed programs.

Conclusion

  • Overview of navigating the file system in Windows.
  • Introduction to similar processes in Linux (to be discussed further).