Site Tools


windows:windows10:linuxsubsystem

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
windows:windows10:linuxsubsystem [2020/12/10 00:11] lunetikkwindows:windows10:linuxsubsystem [2020/12/10 00:43] (current) lunetikk
Line 10: 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?400|{{: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 26: 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.1607555466.txt.gz · Last modified: 2020/12/10 00:11 by lunetikk