Windows Subsystem for Linux

The Windows Subsystem for Linux is an alternative way to setup a complete development environment on Windows. It offers a Linux environment with a seamless bridge to the Windows world. We recommend this setup for Windows developers.


  • Install WSL2 by following this guide. Important: Choose Ubuntu 20.04 LTS as the Linux distribution. Other distributions may not have a sufficient compiler.
  • Optional but recommended: Install the new Windows Terminal
  • Follow the developer guide for Linux from now on.

Using Visual Studio Code as IDE

You can use the native Windows Visual Studio Code IDE (VS Code) for developing in the WSL. It offers code completion, CMake integration, an integrated debugger, git integration and more.


Build and debug OGS

  • Configure your project by following this guide. Select GCC 9.3.0 as the CMake kit.
  • Follow this guide for debug a target. Select ogs as the debug target.

Additional notes

The filesystem of the WSL is not inside your regular user directories. You can find it by running explorer.exe . inside the WSL shell. It should be something like \\wsl$\Ubuntu-20.04\home\[username]\....

You can also run OGS inside the WSL with benchmarks located in your regular Windows directories. You regular filesystem can be accessed inside WSL with the /mnt/c/-prefix. E.g. to run an OGS benchmark:

bin/ogs -o _out /mnt/c/Users/[username]/ogs-src/Tests/Data/Elliptic/square_1x1_SteadyStateDiffusion/square_1e0.prj

This article was written by Lars Bilke. If you are missing something or you find an error please let us know.
Generated with Hugo 0.101.0 in CI job 262272 | Last revision: October 24, 2022
Commit: [web] Update docs on notebook testing and web conversion. 1cb932f  | Edit this page on