Discover how to run SQL Server 2025 on Linux containers within Windows Subsystem for Linux (WSL). This guide walks you through setting up Ubuntu 204, deploying SQL Server in Docker, and leveraging powerful new REGEX functions for advanced data manipulation and testing. Unique :

Running SQL Server 2025 on Linux Containers in WSL: What You Need to Know
Microsoft’s SQL Server 2025 is here, and it’s bringing some exciting new capabilities for developers. This time, running SQL Server on Linux containers inside Windows Subsystem for Linux (WSL) is smoother and more flexible than ever. If you’re a developer who loves mixing Windows and Linux environments, this is a game changer.
What’s New with SQL Server 2025 on WSL?
With SQL Server 2025, Microsoft has enhanced container support on WSL, allowing you to run Linux-native SQL Server instances directly on your Windows machine. This means no need for separate Linux hardware or virtual machines. You can spin up a SQL Server container quickly using Docker Desktop and an Ubuntu 204 distro inside WSL.
“Running SQL Server in containers on WSL is super flexible for development and testing.”
Setting it up is straightforward. Just install WSL, grab your preferred Linux distro (Ubuntu 204 recommended), and launch SQL Server 2025 with a simple Docker command. You’ll be connected in no time using SQL Server Management Studio (SSMS), ready to create databases, tables, and test new features.
Major Updates: Advanced REGEX Functions in SQL Server 2025
One of the standout features in this release is the powerful suite of REGEX functions. SQL Server 2025 now supports:
- REGEXP_LIKE – Filter data using complex regex patterns.
- REGEXP_COUNT – Count occurrences of specific patterns in text.
- REGEXP_INSTR – Find the position of regex matches in strings.
- REGEXP_REPLACE – Replace patterns, ideal for masking sensitive data.
- REGEXP_SUBSTR – Extract substrings based on regex.
These functions open up new possibilities for data validation, text analysis, and data cleanup directly inside your SQL queries. For example, you can now easily redact sensitive info like Social Security Numbers or credit card numbers using REGEXP_REPLACE
.
“These examples are designed to handle real-world scenarios with multiple conditions, nested regex functions, or advanced string manipulations.”
Why This Matters for Developers
Developers get a seamless experience running SQL Server on Windows while leveraging Linux container technology. This hybrid approach simplifies testing, debugging, and experimenting with SQL Server’s latest features without juggling multiple OS setups.
Moreover, the enhanced regex support means you can perform complex string operations natively in SQL Server, reducing the need for external processing or complicated workarounds.
Getting Started Tips
To dive in, make sure you have WSL installed with Ubuntu 204 and Docker Desktop configured. Then run:
docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=YourStrong!Pass123" \
-e "MSSQL_PID=Developer" -e "MSSQL_AGENT_ENABLED=true" \
-p 14333:1433 --name sqlcontainerwsl --hostname sqlcontainerwsl \
-d mcr.microsoft.com/mssql/server:2025-latest
Connect with SSMS on port 14333, and you’re ready to explore SQL Server 2025’s new capabilities.
Final Thoughts
Running SQL Server 2025 on Linux containers inside WSL is a powerful combo for developers who want the best of both worlds. The new regex functions add serious muscle to your SQL toolkit, enabling smarter data handling and validation. If you haven’t tried this setup yet, now’s the perfect time to jump in and experiment.
From the New blog articles in Microsoft Community Hub