User Tools

Site Tools


other:win10wsl

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
other:win10wsl [2022/08/12 14:04]
jypeter Started updating the doc for WSL 2
other:win10wsl [2022/08/23 15:18]
jypeter [Base installation] More content
Line 6: Line 6:
   * What is described on this page was tested with [[https://​docs.microsoft.com/​en-us/​windows/​wsl/​compare-versions#​whats-new-in-wsl-2|WSL 2]].\\ **WSL 2** is available in [[https://​docs.microsoft.com/​en-us/​windows/​wsl/​install-manual#​step-2---check-requirements-for-running-wsl-2|Windows 11 or Windows 10, Version 1903, Build 18362 or later]]   * What is described on this page was tested with [[https://​docs.microsoft.com/​en-us/​windows/​wsl/​compare-versions#​whats-new-in-wsl-2|WSL 2]].\\ **WSL 2** is available in [[https://​docs.microsoft.com/​en-us/​windows/​wsl/​install-manual#​step-2---check-requirements-for-running-wsl-2|Windows 11 or Windows 10, Version 1903, Build 18362 or later]]
  
-  * You can also check JYP's [[other:​win10_wsl_1|original WSL (or WSL1 or WSL v1) instructions]] ​+  * You can also check JYP's [[other:​win10_wsl_1|original WSL instructions]] ​
  
-  * The user can choose to install Linux using WSL1 or WSL2. Check the [[https://​docs.microsoft.com/​en-us/​windows/​wsl/​compare-versions|differences between WSL1 and WSL2]] before choosing+  * The user can choose to install Linux using **WSL 1 or WSL 2** 
 +    * **WSL 2 should be your default choice** 
 +    * If you have doubts, check the [[https://​docs.microsoft.com/​en-us/​windows/​wsl/​compare-versions|differences between WSL1 and WSL2]] and read [[https://​docs.microsoft.com/​en-us/​windows/​wsl/​compare-versions#​exceptions-for-using-wsl-1-rather-than-wsl-2|Exceptions for using WSL 1 rather than WSL 2]] before choosing
 </​note>​ </​note>​
  
Line 14: Line 16:
 ===== What is WSL ? ===== ===== What is WSL ? =====
  
-Useful reading: +//Windows Subsystem for Linux// (**WSL**) lets you **run a Linux distribution ​on your Windows computer**, without ​the overhead of traditional Virtual Machine ​(VMor dual-boot setup
-  * Have a look at the beginning of the [[https://​docs.microsoft.com/​en-us/​windows/wsl/about|Windows Subsystem for Linux Documentation]] for a quick **WSL** ​description on the Microsoft site +
-  ​Read [[https://​wiki.ubuntu.com/​WSL|What is WSL]] on the Ubuntu site +
-    ​There is more useful information on the //​WSL@Ubuntu page//you can read the rest later +
- +
-In few words, WSL is not Linux, it's more a way to [[https://​blogs.msdn.microsoft.com/​wsl/​2016/​06/​15/​wsl-file-system-support/​|share files between Windows and Linux]] ​(it's OK to skip this rather technical link!). [[https://​docs.microsoft.com/​en-us/​windows/​wsl/​faq#​are-files-in-the-linux-drive-different-from-the-mounted-windows-drive|Files under the Linux root (i.e. /) are controlled by WSL which mimics Linux specific behavior [...follow the link for details...]]]. That's why you need //to activate WSL **and then install a Linux distribution**//​.+
  
 +More reading:
 +  * [[https://​docs.microsoft.com/​en-us/​windows/​wsl/​about|What is the Windows Subsystem for Linux? (and WSL 2)]]
 +  * [[https://​wiki.ubuntu.com/​WSL#​What_is_WSL.3F|What is WSL?]] on the Ubuntu wiki site
 ===== Prerequisites ===== ===== Prerequisites =====
  
-  ​* A computer running ​at least //Windows 10 Anniversary Update//, that is with a version number of ''​1607''​ (July 2016) or higher +==== Windows version ==== 
-    * [[other:​win10maintain#​checking_the_installed_version|Check the installed version on your computer]] + 
-    * [[other:​win10misc#​windows_10_versions|Check the available versions]] +  ​* A computer running ​[[https://docs.microsoft.com/en-us/windows/​wsl/​install-manual#​step-2---check-requirements-for-running-wsl-2|Windows 11 or Windows 10Version 1903, Build 18362 or later]] 
-    * [[other:​win10maintain#​updating_windows_10|See if you can update ​your Windows]] ​if your installed version is not the most receent available version +    * [[other:​win10maintain#​checking_the_installed_version|Check the installed version on your computer]]\\ If you don't have the Windows version required for running WSL, you can: 
-      * Note: there is sometimes a delay between the official release and the time when Windows Update will actually tell you that a major update is available for **your** computer (e.g. the //September YY09// update may become available for you only in December)+      * [[other:​win10misc#​windows_10_versions|Check the available ​Windows ​versions]] 
 +      * [[other:​win10maintain#​updating_windows_10|Check if you can update Windows]] 
 + 
 + 
 +==== Computer memory ==== 
 + 
 +FIXME 
 + 
 + 
 +==== Disk space ==== 
 + 
 +FIXME 
   * //Enough// space on ''​C:​\''​. Microsoft instructions say //The Windows Subsystem for Linux only runs on your system drive (usually this is your C: drive)//   * //Enough// space on ''​C:​\''​. Microsoft instructions say //The Windows Subsystem for Linux only runs on your system drive (usually this is your C: drive)//
     * Exporting a //simple// Ubuntu configuration (after doing everything from //Base installation//​ to //Advanced configuration//​ below) with the [[other:​win10wsl#​creating_a_backup_of_the_linux_running_in_wsl|wsl --export]] command generated a 2.7 Gb tar file (uncompressed),​ so it's probably good to **start with at least 3 Gb of free space on ''​C:​\''​** (and you always need to keep enough free space on ''​C:​\''​ for regular Windows operation)     * Exporting a //simple// Ubuntu configuration (after doing everything from //Base installation//​ to //Advanced configuration//​ below) with the [[other:​win10wsl#​creating_a_backup_of_the_linux_running_in_wsl|wsl --export]] command generated a 2.7 Gb tar file (uncompressed),​ so it's probably good to **start with at least 3 Gb of free space on ''​C:​\''​** (and you always need to keep enough free space on ''​C:​\''​ for regular Windows operation)
Line 41: Line 53:
  
   * [[https://​support.microsoft.com/​en-us/​help/​4027538/​windows-create-a-system-restore-point|Create a system restore point]] ([[https://​support.microsoft.com/​fr-fr/​help/​4027538/​windows-create-a-system-restore-point|Créer un point de restauration système]]),​ and give it a meaningful name (e.g. //Before installing WSL//), in the unlikely case you have to restore it later   * [[https://​support.microsoft.com/​en-us/​help/​4027538/​windows-create-a-system-restore-point|Create a system restore point]] ([[https://​support.microsoft.com/​fr-fr/​help/​4027538/​windows-create-a-system-restore-point|Créer un point de restauration système]]),​ and give it a meaningful name (e.g. //Before installing WSL//), in the unlikely case you have to restore it later
 +
 +  * The steps below (based on [[https://​docs.microsoft.com/​en-us/​windows/​wsl/​install|Install Linux on Windows with WSL]]) will work if you have //Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11//
 +    * If you have an older Windows version, follow the [[https://​docs.microsoft.com/​en-us/​windows/​wsl/​install-manual|Manual installation steps for older versions of WSL]]
 +
 +  * Open an ''​Powershell''​ in //​administrator//​ mode, ideally in a [[https://​wiki.lsce.ipsl.fr/​pmip3/​doku.php/​other:​win10apps#​windows_terminal|Windows Terminal]]
 +
 +  * Determine which Linux distributions are available for installation.\\ We will use the default ''​Ubuntu''​ distribution,​ that will always automatically upgrade to the latest ''​LTS''​ version available, but we could use a specific Linux version (or even [[https://​docs.microsoft.com/​en-us/​windows/​wsl/​use-custom-distro|import any Linux distribution]]!)\\ <​code>​PS C:\> wsl --list --online
 +
 +  NAME            FRIENDLY NAME
 +* Ubuntu ​         Ubuntu
 +  Debian ​         Debian GNU/Linux
 +  kali-linux ​     Kali Linux Rolling
 +  openSUSE-42 ​    ​openSUSE Leap 42
 +  SLES-12 ​        SUSE Linux Enterprise Server v12
 +  Ubuntu-16.04 ​   Ubuntu 16.04 LTS
 +  Ubuntu-18.04 ​   Ubuntu 18.04 LTS
 +  Ubuntu-20.04 ​   Ubuntu 20.04 LTS</​code>​
 +
 +  * Install the latest //Ubuntu LTS// version available:​\\ <​code>​PS C:\> wsl --install -d Ubuntu
 +Installation en cours : Plateforme de machine virtuelle
 +Plateforme de machine virtuelle a été installé.
 +Installation en cours : Sous-système Windows pour Linux
 +Sous-système Windows pour Linux a été installé.
 +Téléchargement en cours : Noyau WSL
 +Installation en cours : Noyau WSL
 +Noyau WSL a été installé.
 +Téléchargement en cours : Ubuntu
 +L’opération demandée est réussie. Les modifications ne seront pas effectives avant que le système ne soit réamorcé.</​code>​
 +
 +  * Reboot the computer
  
   * Follow **closely** the steps listed in [[https://​docs.microsoft.com/​en-us/​windows/​wsl/​install-win10|WSL Windows 10 Installation Guide]]. <wrap hi>Open this [[https://​docs.microsoft.com/​en-us/​windows/​wsl/​install-win10|WSL Windows 10 Installation Guide]] in another window, so that you can **read the useful hints below at the same time!**</​wrap>​   * Follow **closely** the steps listed in [[https://​docs.microsoft.com/​en-us/​windows/​wsl/​install-win10|WSL Windows 10 Installation Guide]]. <wrap hi>Open this [[https://​docs.microsoft.com/​en-us/​windows/​wsl/​install-win10|WSL Windows 10 Installation Guide]] in another window, so that you can **read the useful hints below at the same time!**</​wrap>​
other/win10wsl.txt · Last modified: 2023/12/06 13:24 by jypeter