Last active
October 9, 2022 18:05
-
-
Save TheSirop/096f03de622a57bd6c71fd601ff01c30 to your computer and use it in GitHub Desktop.
Установка WSL2 на Win10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Активация поддержки режима Hyper-V в Windows: | |
| $ Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All | |
| # Скачать обновлнение для WSL2 Linux kernel update package for x64 machines: | |
| $ https://docs.microsoft.com/ru-ru/windows/wsl/install-win10#step-4---download-the-linux-kernel-update-package | |
| # Команда для включения VM: | |
| $ dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart | |
| # Команда для включения WSL: | |
| $ dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart | |
| # Команда для переключения WSL на вторую версию: | |
| $ wsl --set-default-version 2 | |
| # Устанавливаем Ubuntu: | |
| $ wsl --install -d Ubuntu | |
| # Если что-то пошло не так. Удаление Ubuntu: | |
| $ wsl --unregister Ubuntu | |
| # Как перейти в домашнюю папку Ubuntu из Windows: | |
| > \\wsl$\Ubuntu\home\<username> | |
| # Как перейти в домашнюю папку Windows из Ubuntu: | |
| $ cd /mnt/c/Users/<username> | |
| # Создать гиперссылку: | |
| $ ln -s /mnt/c/Users/<username> win_home | |
| Комнды WSL: | |
| $ wsl --status (статус) | |
| $ wsl --update (обновление версии WSL) | |
| $ wsl --list (список установленных дистрибутивов) | |
| $ wsl --set-default-version 2 (назначение по умолчанию версии WSL 2) | |
| $ wsl --install -d Ubuntu (установка) | |
| $ wsl --unregister Ubuntu (удаление) | |
| $ wsl --list --verbose (ключ --verbose показывает статус системы) | |
| $ wsl --shutdown (остановка запущенных дистрибутивов, после остановки можно проверить wsl --list --verbose) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment