<commit_before># Windows Subsystem for Linux


```PowerShell
Get-WindowsOptionalFeature -Online

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"

lxrun

lxrun /install /y
```


```
C:\> lxrun
Performs administrative operations on the LX subsystem

Usage:
    /install - Installs the subsystem
        Optional arguments:
            /y - Do not prompt user to accept
    /uninstall - Uninstalls the subsystem
        Optional arguments:
            /full - Perform a full uninstall
            /y - Do not prompt user to accept
    /update - Updates the subsystem
        Optional arguments:
            /critical - Perform critical update. This option will close all running LX processes when the update completes.

C:\> lxrun /install /y<commit_msg>Update windows.SubsystemforLinux.md<commit_after># Windows Subsystem for Linux

## インストール手順

1. 管理者権限でPowerShellを起動。
1. 以下一連のコマンドを実行。
```PowerShell
Get-WindowsOptionalFeature -Online

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"

lxrun

lxrun /install /y
```
#### 以上。







## `lxrun`コマンドについて

```
C:\> lxrun
Performs administrative operations on the LX subsystem

Usage:
    /install - Installs the subsystem
        Optional arguments:
            /y - Do not prompt user to accept
    /uninstall - Uninstalls the subsystem
        Optional arguments:
            /full - Perform a full uninstall
            /y - Do not prompt user to accept
    /update - Updates the subsystem
        Optional arguments:
            /critical - Perform critical update. This option will close all running LX processes when the update completes.

C:\> lxrun /install /y
{'fraction_non_alphanumeric': 0.0751386787695411, 'fraction_numerical': 0.002017145738779627, 'mean_word_length': 3.048979591836735, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3377459', 'n_tokens_mistral': 617, 'n_tokens_neox': 569, 'n_words': 193}