Windows with WSL#
Important
Distributions compatibility: Windows 10 and Windows 11
See also
This tutorial is aimed at Windows users who have no prior knowledge of Linux. It explains how to install Ubuntu 24.04 LTS in the Windows Subsystem for Linux (WSL). Lethe is then installed following the Regular Installation on Linux instructions.
- Throughout this tutorial:
Tip
To execute a command on a shell (Ubuntu or Windows command prompt), type or copy/paste the given command and hit Enter. Multiple commands are given in multiple lines, or separated by ;: when copying/pasting, they will be executed one after the other.
Installing WSL and Ubuntu#
Install WSL (Windows Subsystem for Linux) and Ubuntu 24.04 LTS. Open PowerShell or the Windows Command Prompt in administrator mode by right-clicking on it and selecting “Run as administrator”, enter the following command, then restart your computer:
Verify the installed version of WSL
In the Windows command prompt (Start menu > cmd):
should indicate 2 in the VERSION column. If not, follow these instructions to upgrade to WSL 2.
Launch Ubuntu 24.04 LTS from the Start menu. The first time, you will be asked to choose a username and a password for Ubuntu. Then,
update Ubuntu:
Tip
The sudo command will ask you to type your Ubuntu password. Note that Linux does not show any symbol while typing a password, contrary to Windows with *: simply type your password and press Enter.
When prompted “Do you want to continue?”, proceed by typing y and hitting Enter.
(optional) For better ease in the Linux terminal (better coloring, multiple tabs), use Windows Terminalto launch Ubuntu. It is installed by default on Windows 11 and can be downloaded from the Microsoft Store on Windows 10. In its settings, you can select the Ubuntu profile as the default profile. In the terminal, useCtrl+Shift+CandCtrl+Shift+Vto copy and paste text or commands.
Tip
- A (very) few Linux commands useful for navigation:
mkdir $dir: (make directory) create a directory with the name specified as$dircd $dir: (change directory) move to the directory$dircd ..: move up to the parent directorypwd: (print working directory) return the directory you are incd $HOME: move to your home directory (/home/<user_name>/)explorer.exe .: open the directory you are in with the Windows File Explorer
You can find here a thorough guide for the most basic Linux commands.
Installing deal.II and Lethe#
From this point on, Ubuntu running in WSL behaves like any Linux installation: follow the Regular Installation on Linux instructions, running every command in the Ubuntu terminal (
). Installing deal.II with apt (Installing deal.II using apt) is by far the easiest way to proceed.
Tip
A fresh Ubuntu installation does not include the tools needed to compile and test Lethe. Install them first:
To edit a file of the Ubuntu file system (e.g. the candi.cfg file of candi), open its folder with explorer.exe . and use any Windows text editor, or edit it directly in the terminal with nano <file_name>.