Skip to content

WindowsWSL

felhub edited this page Mar 5, 2025 · 3 revisions

title: Windows WSL + Tools

Developing CFS on Windows using Ubuntu 24.04 in the WSL

This guide describes the necessary steps to get started developing CFS on Windows systems, using the Windows Subsystem for Linux (WSL). Related Tips & Tricks are also collected here.

Setup WSL with Ubuntu 24.04

The installation of WSL is well documented in this guide. Be sure to select the correct distribution when installing the WSL by first running

wsl --list --online

And select Ubuntu 24.04 for installation by typing

wsl --install -d Ubuntu-24.04

After the correct installation follow the linked guide to setup your WSL. The WSL is automatically started, indicated by the green shell. If not activated type

wsl

Before installing anything you should always update your system with

sudo apt update
sudo apt dist-upgrade

Congratulations, you now have an up to date Ubuntu 24.04 installation in your WSL.

Get source and build

Because you are now running Linux, you can follow the Linux based guides to get the source code and to configure and build on Linux.

Connect VSCode to WSL

A great way to develop Linux base on Windows is to connect your VSCode to the WSL. This is well documented in this guide.

You can then follow the VSCode development guide to get set for CFS development.

Tips & Tricks

Accessing the Windows filesystem

You can access Windows drives through the mount directory, to try it out type e.g.:

ls /mnt/c/

Using multiple cores

You can select how many cores you want to make available to the WSL. Create or edit the config file on Windows under C:\\Users\USERNAME\.wslconfig and add

[wsl2]
processors=8

Unlike the name implies the number corresponds to logical processors (threads) and not physical cores.

Speeding up WSL

By default many Windows paths get appended to your $PATH inside the WSL. You can see this by running

echo $PATH | grep /mnt/c/

This can slow down compilation and other processes, that search your paths for something. To change this default behavior, on your WSL create or edit the config file /etc/wsl.conf and add

[interop]
appendWindowsPath = false

If you do this, no Windows paths are appended by default. If you use VSCode remote host, you need to add the VSCode Windows path back in manually, by adding it to ~/.bashrc

export PATH="$PATH:/mnt/c/Users/USERNAME/AppData/Local/Programs/Microsoft VS Code/bin"

Clone this wiki locally