Site Tools


windows:windows10:linuxsubsystem

Differences

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

Link to this comparison view

Next revision
Previous revision
windows:windows10:linuxsubsystem [2020/12/10 00:10] – created lunetikkwindows:windows10:linuxsubsystem [2020/12/10 00:43] (current) lunetikk
Line 3: Line 3:
 ===== What is a Windows Subsystem for Linux? ===== ===== What is a Windows Subsystem for Linux? =====
  
->Windows Subsystem for Linux (WSL) is a compatibility layer for running Linux binary executables (in ELF format) natively on Windows 10 and Windows Server 2019. +>Windows Subsystem for Linux (WSL) is a compatibility layer for running Linux binary executables (in ELF format) natively on Windows 10 and Windows Server 2019. In May 2019, WSL 2 was announced, introducing important changes such as a real Linux kernel, through a subset of Hyper-V features. Since June 2019, WSL 2 is available to Windows 10 customers through the Windows Insider program, including the Home edition. 
- +
-In May 2019, WSL 2 was announced,[2] introducing important changes such as a real Linux kernel,[3] through a subset of Hyper-V features. Since June 2019, WSL 2 is available to Windows 10 customers through the Windows Insider program, including the Home edition. +
 [[https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux|Wikipedia - Windows Subsystem for Linux]] [[https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux|Wikipedia - Windows Subsystem for Linux]]
  
Line 12: Line 10:
 Go to Windows features and activate "Windows Subsystem for Linux" Go to Windows features and activate "Windows Subsystem for Linux"
  
-{{:windows:windows10:pasted:20201210-000241.png}} +{{:windows:windows10:pasted:20201210-000241.png?400|{{:windows:windows10:pasted:20201210-000241.png}}
  
 Afterwards go to the Microsoft Store, search for Linux and install a distribution of your choice Afterwards go to the Microsoft Store, search for Linux and install a distribution of your choice
Line 28: Line 26:
 Maybe start with [[linux:general:sudoers|Sudoers]] Maybe start with [[linux:general:sudoers|Sudoers]]
  
 +==== Mount shares ====
 +
 +<code>
 +#mount a local drive from your windows host on linux
 +mkdir /drivez
 +mount -t drvfs 'Z:' /drivez
 +</code>
 +
 +===== Commands =====
 +
 +==== Powershell ====
 +
 +Certain tasks like reboots cant be done inside Linux and need to be executed via Powershell
 +
 +^  Command  ^  Function  ^
 +|  wsl.exe --shutdown  |  Shutdown everything (Build 18917+)  |
 +|  wsl.exe -t <Distroname>  |  Terminate the session (Windows 1903+)  |
 +|  Restart-Service LxssManager  |  Restart the Manager (older Versions)  |
 +|  wsl.exe -l  |  List all Distros  |
 +
 +===== Troubleshooting =====
 +
 +==== Rescue login via root ====
 +
 +Open regedit, go to "Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss\"
 +
 +Inside your Distrofolder you will find "DefaultUid", reset the value to your root UID (mostly 0).
 +
 +Reopen your shell and you should be root. 
  
 +After your rescue job is done, reset the value to your default users UID (mostly 1000)
  
 +{{:windows:windows10:pasted:20201210-003532.png?800|{{:windows:windows10:pasted:20201210-003532.png}}
  
windows/windows10/linuxsubsystem.1607555413.txt.gz · Last modified: 2020/12/10 00:10 by lunetikk