From b59a6b03df79e01899ca2e6bb3bb6c2a5d0b8597 Mon Sep 17 00:00:00 2001 From: Morgan Date: Tue, 13 Mar 2018 19:13:27 +0100 Subject: [PATCH] cheat sheet for windows subsystem in linux --- cheat/windows-subsystem.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 cheat/windows-subsystem.md diff --git a/cheat/windows-subsystem.md b/cheat/windows-subsystem.md new file mode 100644 index 0000000..85ed444 --- /dev/null +++ b/cheat/windows-subsystem.md @@ -0,0 +1,16 @@ +* as admin : +`dism /online /Enable-Feature /NoRestart /FeatureName:Microsoft-Windows-Subsystem-Linux` + +* create AppModelUnlock if it doesn't exist, required for enabling Developer Mode. Sources : + * https://stackoverflow.com/questions/40033608/enable-windows-10-developer-mode-programmatically#40033638 + * https://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/ + * https://gallery.technet.microsoft.com/scriptcenter/Enable-developer-mode-27008e86 + +``` +$registryUpdates = @{ + "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock\AllowDevelopmentWithoutDevLicense" = 1 +} +$registryUpdates.GetEnumerator() | ForEach-Object { + & reg add (Split-Path -Parent $_.Key) /v (Split-Path -Leaf $_.Key) /t REG_DWORD /d $_.Value /f | Out-Null +} +```