Linux,  Windows

Developing for OpenFOAM on Windows 10 – Part 1

Installing WSL on Windows 10 Fall Creators Update

The following steps illustrate how to install the Windows Subsystem for Linux (WSL) on Windows 10 Falls Creators Update. The procedure is slightly different from previous versions of WSL, because the possibility of using different distributions was added in this update. Each distribution can be obtained from the Microsoft Store.

  1. The first step consists in launching the tool to add extra features to Windows 10. This tool can be found by pressing Win + S, and typing “Features”. The menu will show the icon in the figure.
  2. In the tool, scroll down and select “Windows Subsystem for Linux”. Check the box, and click on OK.
  3. Soon after, Windows will confirm the installation was successful. A reboot is necessary to complete it.
  4. Once the system has rebooted, open the Microsoft Store app, which can be found pressing Win-S, and searching “store”.
  5. In the Microsoft Store app, search for Ubuntu, and select the Ubuntu app.
  6. Click on the “Install” button. After the installation is complete you should see the following screen, with the “Launch” button.
  7. Press the “Launch button”. A terminal will open, asking to wait for the installation to complete.
  8. When the installation is complete, the system will ask to insert a user name for the UNIX system, and the corresponding password. Select the user name you prefer, and specify a secure password.
  9. After the password is confirmed successfully, the terminal prompt will appear, indicating that WSL is working properly, as shown below.

The installation can be tested by typing some commands like free or df, which report the amount of free RAM and disc space, respectively.

The next part will focus on installing and configuring OpenFOAM on Ubuntu running under WSL.

Enjoy!  :mrgreen:

This offering is not approved or endorsed by OpenCFD Limited, the producer of the OpenFOAM software and owner of the OPENFOAM® and OpenCFD® trade marks. Alberto Passalacqua is not associated to OpenCFD Ltd.