HEP DEV Docs
GitHubToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto modeBack to homepage

Windows Subsystem for Linux 2

Installation

Since the Windows 10 build version 1903 or higher the Windows Subsystem for Linux 2 (WSL 2) is available. The most important improvement for HEP is the FUSE support which allows us to mount the global file system, CVMFS. Full installation instructions can be found on the Official Microsoft Pages.

The installation consists of four parts:

  1. Open Powershell with admin rights:
How to start Powershell with admin rights
How to start Powershell with admin rights
  1. Install the Windows Subsystem for Linux:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
  1. Enable “Virtual MAchine Platform”
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
  1. Set WSL 2 as your default version:
wsl --set-default-version 2

After this is done, you need to install your Linux distribution of choice: Ubuntu 20.04 is recommended. This can be done via the Microsoft Store.

Note: CentOS 7 exists in the Microsoft Store, but is not free. Instead, we will use the Ubunutu distribution in combination with Docker to provide any OS available as docker image (includes CentOS 6-8).

Accessing files from WSL inside Windows

Due to the tight integration between WSL and Windows, some windows commands are available withing WSL. Once such command is

explorer.exe .

Note: The . is very important as it denotes the current folder.

When executed in a folder inside a WSL instance, it will open the current folder in the Windows Explorer as a network mount:

Access files in WSL 2 from Windows Explorer
Access files in WSL 2 from Windows Explorer

Soon: Access Linux filessystems in Windows and WSL2