Kick off your book project in 3 hours! Live workshop on Zoom. You’ll leave with a real book project, progress on your first chapter, and a clear plan to keep going. Saturday, June 6, 2026. Learn more…

Leanpub Header

Skip to main content

WSL for Delphi and DMVCFramework

This book is 100% completeLast updated on 2026-05-30

Your backend will run on Linux sooner or later!

Minimum price

$11.90

$22.90

You pay

Author earns

$
PDF
About

About

About the Book

"I develop on Windows, so Linux is none of my business." Wrong. And it's costing you time and money.


Your backend will run on Linux sooner or later: containers, cloud, VPS. This guide turns your Windows PC into a full Linux lab with WSL, driven from PowerShell, with no heavy virtual machines and no reboots.

Inside, step by step:

- Start, manage and kill Linux programs and services with a single command

- Run and test your Delphi (Linux64) and DMVCFramework server in the real production environment

- PostgreSQL, Firebird 5, Redis and Docker ready locally

- Windows test clients with the backend in WSL

- Automate build, deploy and test with AI agents (Claude Code, Codex)

- What to do, and what to avoid, in production

Packed with ready-to-use PowerShell scripts and every single command verified hands-on, not copied from the docs.

Stop saying "it works on my machine." Make it actually work, on Linux, while staying on Windows.

Share this book

Author

About the Author

DANIELE TETI

Daniele Teti is a software architect, trainer, books author and consultant with over 20 years of experience. Daniele is a well-known Delphi and programming expert in the developer community and is a regular speaker for italian and international conferences. Daniele is the author of the best-selling "Delphi Cookbook" books serie published by PacktPub. He's the main developer and drives the development of the most popular Delphi open source project on github: DelphiMVCFramework. Among DelphiMVCFramework Daniele is the lead developer for other well know OS projects like ColumbusEgg4Delphi, DelphiREDISClient, DelphiSTOMPClient and many others. He is also a huge fan of design patterns, machine learning and AI. Daniele is the CEO of bit Time Professionals, an Italian company specializing in high-level consultancy, training, development and machine learning systems.

Contents

Table of Contents

  • 1. What's New in This Edition
  • 2. Why WSL Is Essential for the Developer
    • 2.1 The World Runs on Linux
    • 2.2 What Made Everything Harder Before WSL
    • 2.3 The Concrete Value for Developers
    • 2.4 "But I Do Desktop Development": Why It Concerns You Too
  • 3. Introduction: Why Drive WSL from PowerShell?
    • 3.1 The "I Open the Terminal and Type by Hand" Problem
    • 3.2 The Solution: WSL as a Command, Not as an Environment
    • 3.3 When This Approach Shines
    • 3.4 WSL and AI Agents: Automatic Multi-platform Orchestration
  • 4. Fundamental Concepts
    • 4.1 What WSL Is and What It Is NOT
    • 4.2 Distribution vs Subsystem
    • 4.3 The Lifecycle of a Distribution
  • 5. Prerequisites and Verifying the Installation
    • 5.1 Checking Whether WSL Is Installed
    • 5.2 Installing WSL (if necessary)
    • 5.3 Listing the Distributions
    • 5.4 Setting the Default Distribution
  • 6. Anatomy of the wsl.exe Command
    • 6.1 General Form
    • 6.2 The Options You Will Use Every Day
    • 6.3 The Crucial Difference: -e vs Direct Command vs bash -c
  • 7. Launching Linux Programs from PowerShell
    • 7.1 Essential Practical Examples
    • 7.2 Running a Command and Capturing Its Output in PowerShell
    • 7.3 Running as a Specific User
    • 7.4 Setting the Working Directory
    • 7.5 Launching Programs in the Background from PowerShell's Point of View
    • 7.6 Linux GUI Applications with WSLg
  • 8. Managing Running Processes and Distributions
    • 8.1 Seeing Which Distributions Are Active
    • 8.2 Inspecting Linux Processes from the Outside
    • 8.3 Monitoring Resource Usage
  • 9. Terminating and Killing: Shutting Down Cleanly
    • 9.1 The Three Levels of Termination
    • 9.2 Level 1: Killing a Single Linux Process
    • 9.3 Level 2: Terminating a Distribution
    • 9.4 Level 3: Shutting Down All of WSL
    • 9.5 The "8-Second Rule"
  • 10. Automatic Program Startup
    • 10.1 Method 1: wsl.conf with the [boot] Section
    • 10.2 Method 2: A Reusable PowerShell Script
    • 10.3 Method 3: Task Scheduler (Start at Windows Login)
  • 11. Advanced Configuration
    • 11.1 .wslconfig: Global Settings (Windows side)
    • 11.2 wsl.conf: Per-distribution Settings (Linux side)
    • 11.3 The Sections of wsl.conf
  • 12. Real Use Cases
    • 12.1 Development with PostgreSQL
    • 12.2 Development with FirebirdSQL
    • 12.3 Starting the Docker Daemon
    • 12.4 Automatic Build of a Node.js Project
    • 12.5 Automatic SSH Connection
    • 12.6 Running a Bash Script with Arguments
  • 13. Applicability Scenarios for Delphi Backend Development
    • 13.1 Why a Delphi Developer Should Use WSL
    • 13.2 Scenario 1: Linux Server in WSL + Windows Client
    • 13.3 Scenario 2: Starting/Stopping the Linux WebApp from a Windows Script
    • 13.4 Scenario 3: PAServer in WSL for Linux64 Deployment from RAD Studio
    • 13.5 Scenario 4: Reverse Proxy and HTTPS Locally
    • 13.6 Scenario 5: The Same Distribution as Production
    • 13.7 Scenario 6: Containerizing the Server (Docker in WSL)
    • 13.8 Map of the Scenarios
  • 14. WSL in the Testing and Development Phases with DMVCFramework
    • 14.1 Phase 1: Development Loop (Dev Inner Loop)
    • 14.2 Phase 2: Smoke Testing the Endpoints
    • 14.3 Phase 3: End-to-End Integration Tests
    • 14.4 Phase 3b: Client Tests on Windows with the Backend in WSL
    • 14.5 Phase 4: Load and Performance Testing
    • 14.6 Phase 5: An "All-in-One" Local CI Script
  • 15. Automating with AI Agents: Claude Code and Codex
    • 15.1 The Two Execution Models
    • 15.2 Quick Setup
    • 15.3 End-to-End Example: Handing the Agent Build, Deploy and Test
    • 15.4 Why Agents Get Along Well with WSL
    • 15.5 A Note on Security
  • 16. Best Practices and Troubleshooting
    • 16.1 Best Practices
    • 16.2 Common Problems
  • 17. WSL in Production: Recommendations
    • 17.1 Pros and Cons
    • 17.2 The Recommendation
  • 18. Summary of the Main Commands
    • 18.1 Startup and Execution
    • 18.2 Management and Monitoring
    • 18.3 Termination
    • 18.4 Configuration
  • 19. Complete Table of wsl.exe Options
  • 20. Official Resources
  • 21. Scripts Included in the Code/ Folder

Get the free sample chapters

Click the buttons to get the free sample in PDF or EPUB, or read the sample online here

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub