Native linux on windows

Содержание
  1. What is the Windows Subsystem for Linux?
  2. What is WSL 2?
  3. Действия по установке для старых версий WSL вручную
  4. Шаг 1. Включение подсистемы Windows для Linux
  5. Шаг 2. Проверка требований для запуска WSL 2
  6. Шаг 3. Включение компонента виртуальных машин
  7. Шаг 4. Скачивание пакета обновления ядра Linux
  8. Шаг 5. Выбор WSL 2 в качестве версии по умолчанию
  9. Шаг 6. Установка дистрибутива Linux по выбору
  10. Устранение неполадок установки
  11. Скачивание дистрибутивов
  12. Установка Терминала Windows (необязательно)
  13. Run Linux GUI apps on the Windows Subsystem for Linux (preview)
  14. Install support for Linux GUI apps
  15. Prerequisites
  16. Fresh install — No prior WSL installation
  17. Existing WSL install
  18. Run Linux GUI apps
  19. Update the packages in your distribution
  20. Install Gedit
  21. Install GIMP
  22. Install Nautilus
  23. Install VLC
  24. Install X11 apps
  25. Install Google Chrome for Linux
  26. Install Microsoft Teams for Linux
  27. Install Microsoft Edge browser for Linux
  28. Frequently Asked Questions about Windows Subsystem for Linux
  29. General
  30. What is Windows Subsystem for Linux (WSL)?
  31. Who is WSL for?
  32. What can I do with WSL?
  33. Could you describe a typical development workflow that incorporates WSL?
  34. What is Bash?
  35. How does this work?
  36. Why would I use WSL rather than Linux in a VM?
  37. Why would I use, for example, Ruby on Linux instead of on Windows?
  38. What does this mean for PowerShell?
  39. What processors does WSL support?
  40. How do I access my C: drive?
  41. How do I set up Git Credential Manager? (How do I use my Windows Git permissions in WSL?)
  42. How do I use a Windows file with a Linux app?
  43. Are files in the Linux drive different from the mounted Windows drive?
  44. How do I uninstall a WSL Distribution?
  45. How do I run an OpenSSH server?
  46. How do I change the display language of WSL?
  47. Why do I not have internet access from WSL?
  48. How do I access a port from WSL in Windows?
  49. How can I back up my WSL distributions, or move them from one drive to another?
  50. WSL 2
  51. Does WSL 2 use Hyper-V? Will it be available on Windows 10 Home?
  52. What will happen to WSL 1? Will it be abandoned?
  53. Will I be able to run WSL 2 and other 3rd party virtualization tools such as VMware, or VirtualBox?
  54. Can I access the GPU in WSL 2? Are there plans to increase hardware support?
  55. Will WSL 2 be able to use networking applications?
  56. Can I run WSL 2 in a virtual machine?
  57. Can I use wsl.conf in WSL 2?
  58. Where can I provide feedback?

What is the Windows Subsystem for Linux?

The Windows Subsystem for Linux lets developers run a GNU/Linux environment — including most command-line tools, utilities, and applications — directly on Windows, unmodified, without the overhead of a traditional virtual machine or dualboot setup.

  • Choose your favorite GNU/Linux distributions from the Microsoft Store.
  • Run common command-line tools such as grep , sed , awk , or other ELF-64 binaries.
  • Run Bash shell scripts and GNU/Linux command-line applications including:
    • Tools: vim, emacs, tmux
    • Languages: NodeJS, Javascript, Python, Ruby, C/C++, C# & F#, Rust, Go, etc.
    • Services: SSHD, MySQL, Apache, lighttpd, MongoDB, PostgreSQL.
  • Install additional software using your own GNU/Linux distribution package manager.
  • Invoke Windows applications using a Unix-like command-line shell.
  • Invoke GNU/Linux applications on Windows.

What is WSL 2?

WSL 2 is a new version of the Windows Subsystem for Linux architecture that powers the Windows Subsystem for Linux to run ELF64 Linux binaries on Windows. Its primary goals are to increase file system performance, as well as adding full system call compatibility.

This new architecture changes how these Linux binaries interact with Windows and your computer’s hardware, but still provides the same user experience as in WSL 1 (the current widely available version).

Individual Linux distributions can be run with either the WSL 1 or WSL 2 architecture. Each distribution can be upgraded or downgraded at any time and you can run WSL 1 and WSL 2 distributions side by side. WSL 2 uses an entirely new architecture that benefits from running a real Linux kernel.

Источник

Действия по установке для старых версий WSL вручную

Для простоты мы обычно советуем применять wsl —install для установки подсистемы Windows для Linux, но если вы используете более старую сборку Windows, эта команда может не поддерживаться. Этапы установки вручную описаны ниже. Если во время установки возникла проблема, см. раздел Установка руководства по устранению неполадок.

Шаг 1. Включение подсистемы Windows для Linux

Перед установкой дистрибутивов Linux в Windows необходимо включить дополнительный компонент «Подсистема Windows для Linux».

Запустите PowerShell с правами администратора и выполните следующую команду.

Теперь перейдите к шагу 2 и выполните обновление до WSL 2. Если вы хотите установить только WSL 1, вы можете перезагрузить компьютер и перейти к разделу Шаг 6. Установка дистрибутива Linux по выбору. Чтобы выполнить обновление до WSL 2, дождитесь перезагрузки компьютера и перейдите к следующему шагу.

Шаг 2. Проверка требований для запуска WSL 2

Для обновления до WSL 2 требуется Windows 10.

  • Для 64-разрядных систем: версия 1903 или более поздняя со сборкой 18362 или более поздней версии.
  • Для систем ARM64: версия 2004 или более поздняя со сборкой 19041 или более поздней версии.
  • Сборки ниже 18362 не поддерживают WSL 2. Для обновления версии Windows используйте помощник по обновлению Windows.

Чтобы проверить версию и номер сборки, нажмите клавиши Windows+R, введите winver и нажмите кнопку ОК. В меню «Параметры» выполните обновление до последней версии Windows.

Если вы используете Windows 10 версии 1903 или 1909, в меню Windows откройте меню «Параметры», перейдите к разделу «Обновления и безопасность» и выберите «Проверить наличие обновлений». Номер сборки должен быть 18362.1049 и выше или 18363.1049 и выше с номером дополнительной сборки не ниже 1049. Подробнее: поддержка WSL 2 вскоре будет реализована в Windows 10 версий 1903 и 1909.

Шаг 3. Включение компонента виртуальных машин

Перед установкой WSL 2 необходимо включить необязательный компонент Платформа виртуальных машин. Для использования этой функции на компьютере потребуются возможности виртуализации.

Запустите PowerShell с правами администратора и выполните следующую команду.

Перезапустите компьютер, чтобы завершить установку и обновление WSL до WSL 2.

Шаг 4. Скачивание пакета обновления ядра Linux

Скачайте пакет последней версии:

Если вы используете компьютер ARM64, вместо этого скачайте пакет ARM64. Если вы не знаете, какой тип компьютера используете, откройте командную строку или PowerShell и введите systeminfo | find «System Type» . Внимание! В неанглоязычных версиях Windows может потребоваться изменить текст поиска, введя строку «System Type» (тип системы) на языке используемой версии. Кавычки могут также не понадобиться. Например, в версии на немецком языке нужно ввести systeminfo | find ‘»Systemtyp»‘ .

Запустите пакет обновления, скачанный на предыдущем этапе. (Для запуска щелкните дважды. Появится запрос на повышение уровня разрешений. Нажмите кнопку «Да», чтобы утвердить эту установку.)

Когда установка завершится, перейдите к следующему шагу — выбору WSL 2 в качестве версии по умолчанию при установке новых дистрибутивов Linux. (Пропустите этот шаг, если вы хотите, чтобы новые дистрибутивы Linux были установлены в WSL 1).

Шаг 5. Выбор WSL 2 в качестве версии по умолчанию

Откройте PowerShell и выполните следующую команду, чтобы задать WSL 2 в качестве версии по умолчанию при установке нового дистрибутива Linux:

Шаг 6. Установка дистрибутива Linux по выбору

Откройте Microsoft Store и выберите предпочтительный дистрибутив Linux.

Ниже приведены ссылки на страницы Microsoft Store для каждого дистрибутива:

На странице дистрибутива щелкните «Получить».

При первом запуске недавно установленного дистрибутива Linux откроется окно консоли, и вам будет предложено подождать минуту или две, чтобы файлы распаковались и сохранились на компьютере. Все будущие запуски должны занимать меньше секунды.

Читайте также:  Как установить герцовку монитора windows 10

Поздравляем! Вы успешно установили и настроили дистрибутив Linux, который полностью интегрирован с операционной системой Windows.

Устранение неполадок установки

Если во время установки возникла проблема, см. раздел Установка руководства по устранению неполадок.

Скачивание дистрибутивов

Бывают сценарии, когда вы не можете (или не хотите) устанавливать дистрибутивы WSL Linux с помощью Microsoft Store. Вы можете использовать номер SKU классической ОС Windows Server или Long-Term Servicing (LTSC), который не поддерживает Microsoft Store, или политики корпоративной сети и административные параметры запрещают использовать Microsoft Store в вашей среде. В таких случаях, хотя WSL можно использовать, возможно, потребуется загрузить дистрибутивы Linux напрямую.

Если приложение Microsoft Store недоступно, вы можете скачать и вручную установить дистрибутивы Linux, используя следующие ссылки:

Это приведет к скачиванию пакетов .appx в выбранную папку.

Кроме того, при желании вы можете скачать предпочтительные дистрибутивы с помощью командной строки, используя командлет PowerShell Invoke-WebRequest. Например, для скачивания Ubuntu 20.04:

Если загрузка занимает много времени, выключите индикатор выполнения, задав $ProgressPreference = ‘SilentlyContinue’ .

Кроме того, вы можете использовать служебную программу командной строки для скачивания. Чтобы скачать Ubuntu 20.04 с помощью curl:

В этом примере выполняется curl.exe (а не только curl ), чтобы в PowerShell вызывался реальный исполняемый файл curl, а не его псевдоним для Invoke-WebRequest в PowerShell.

После скачивания дистрибутива перейдите к папке со скачанным файлом и выполните следующую команду в этом каталоге, где app-name — имя APPX-файла дистрибутива Linux.

Если вы используете Windows Server или у вас возникли проблемы с выполнением приведенной выше команды, можно найти альтернативные инструкции по установке на странице документации Windows Server, чтобы установить файл .appx , изменив его на ZIP-файл.

Установка Терминала Windows (необязательно)

С помощью Терминала Windows можно открыть несколько вкладок или областей окна для просмотра нескольких дистрибутивов Linux или других командных строк (PowerShell, командная строка, Azure CLI и пр.), а также быстрого переключения между ними. Вы можете полностью настроить терминал, используя уникальные цветовые схемы, стили шрифтов, размеры, фоновые изображения и пользовательские сочетания клавиш. Подробнее.

Источник

Run Linux GUI apps on the Windows Subsystem for Linux (preview)

You can now preview Windows Subsystem for Linux (WSL) support for running Linux GUI applications (X11 and Wayland) on Windows in a fully integrated desktop experience.

WSL 2 enables Linux GUI applications to feel native and natural to use on Windows.

  • Launch Linux apps from the Windows Start menu
  • Pin Linux apps to the Windows task bar
  • Use alt-tab to switch between Linux and Windows apps
  • Cut + Paste across Windows and Linux apps

You can now integrate both Windows and Linux applications into your workflow for a seamless desktop experience.

Install support for Linux GUI apps

Prerequisites

You will need to be on Windows 11 Build 22000 or higher to access this feature. You can join the Windows Insiders Program to get the latest preview builds.

Installed driver for vGPU

To run Linux GUI apps, you should first install the preview driver matching your system below. This will enable you to use a virtual GPU (vGPU) so you can benefit from hardware accelerated OpenGL rendering.

Fresh install — No prior WSL installation

If you have not already done so, install WSL and set up a user name and password for your Linux distribution.

Open a command prompt with administrator privileges.

Select Start, type PowerShell, right-click Windows PowerShell, and then select Run as administrator.

Run this command and reboot your machine when prompted:

Once your machine has finished rebooting, installation will continue and you will be asked to enter a username and password. This will be your Linux credential for the Ubuntu distribution.

You’re now ready to begin using Linux GUI apps on WSL!

Existing WSL install

If you already have WSL installed on your machine, you can update to the latest version that includes Linux GUI support by running the update command from an elevated command prompt.

Select Start, type PowerShell, right-click Windows PowerShell, and then select Run as administrator.

Enter the WSL update command:

You will need to restart WSL for the update to take effect. You can restart WSL by running the shutdown command in PowerShell.

Linux GUI apps are only supported with WSL 2 and will not work with a Linux distribution configured for WSL 1. Read about how to change your distribution from WSL 1 to WSL 2.

Run Linux GUI apps

You can run the following commands from your Linux terminal to download and install these popular Linux applications. If you are using a different distribution than Ubuntu, it may use a different package manager than apt. Once the Linux application is installed, you can find it in your Start menu under the distribution name. For example: Ubuntu -> Microsoft Edge .

Update the packages in your distribution

Install Gedit

Gedit is the default text editor of the GNOME desktop environment.

To launch your bashrc file in the editor, enter: gedit

Install GIMP

GIMP is a free and open-source raster graphics editor used for image manipulation and image editing, free-form drawing, transcoding between different image file formats, and more specialized tasks.

To launch, enter: gimp

Install Nautilus

Nautilus, also known as GNOME Files, is the file manager for the GNOME desktop. (Similiar to Windows File Explorer).

To launch, enter: nautilus

Install VLC

VLC is a free and open source cross-platform multimedia player and framework that plays most multimedia files.

To launch, enter: vlc

Install X11 apps

X11 is the Linux windowing system and this is a miscellaneous collection of apps and tools that ship with it, such as the xclock, xcalc calculator, xclipboard for cut and paste, xev for event testing, etc. See the x.org docs for more info.

To launch, enter the name of the tool you would like to use. For example:

Install Google Chrome for Linux

To install the Google Chrome for Linux:

  1. Change directories into the temp folder: cd /tmp
  2. Use wget to download it: sudo wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
  3. Get the current stable version: sudo dpkg -i google-chrome-stable_current_amd64.deb
  4. Fix the package: sudo apt install —fix-broken -y
  5. Configure the package: sudo dpkg -i google-chrome-stable_current_amd64.deb

To launch, enter: google-chrome

Install Microsoft Teams for Linux

To install Microsoft Teams for Linux:

  1. Change directories into the temp folder: cd /tmp
  2. Use curl to download the package: sudo curl -L -o «./teams.deb» «https://teams.microsoft.com/downloads/desktopurl?env=production&plat=linux&arch=x64&download=true&linuxArchiveType=deb»
  3. Use apt to install it: sudo apt install ./teams.deb -y

To launch, enter: teams

Install Microsoft Edge browser for Linux

Find information on how to install the Microsoft Edge browser for Linux using the command line on the Edge Insider site. Select Get instructions under the Command line installation section of the page.

Источник

Frequently Asked Questions about Windows Subsystem for Linux

General

What is Windows Subsystem for Linux (WSL)?

The Windows Subsystem for Linux (WSL) is a feature of the Windows operating system that enables you to run a Linux file system, along with Linux command-line tools and GUI apps, directly on Windows, alongside your traditional Windows desktop and apps.

See the about page for more details.

Читайте также:  Нужен сам файл операционной системы windows

Who is WSL for?

This is primarily a tool for developers, especially web developers, those working on open source projects, or deploying to Linux server environments. WSL is for anyone who likes using Bash, common Linux tools ( sed , awk , etc.) and Linux-first frameworks (Ruby, Python, etc.) but also enjoys using Windows productivity tools

What can I do with WSL?

WSL enables you to run Linux in a Bash shell with your choice of distribution (Ubuntu, Debian, OpenSUSE, Kali, Alpine, etc). Using Bash, you can run command-line Linux tools and apps. For example, type lsb_release -a and hit enter; you’ll see details of the Linux distro currently running:

You can also access your local machine’s file system from within the Linux Bash shell – you’ll find your local drives mounted under the /mnt folder. For example, your C: drive is mounted under /mnt/c :

Could you describe a typical development workflow that incorporates WSL?

WSL targets a developer audience with the intent to be used as part of an inner development loop. Let’s say that Sam is creating a CI/CD pipeline (Continuous Integration & Continuous Delivery) and wants to test it first on a local machine (laptop) before deploying it to the cloud. Sam can enable WSL (& WSL 2 to improve speed and performance), and then use a genuine Linux Ubuntu instance locally (on the laptop) with whatever Bash commands and tools they prefer. Once the development pipeline is verified locally, Sam can then push that CI/CD pipeline up to the cloud (ie Azure) by making it into a Docker container and pushing the container to a cloud instance where it runs on a production-ready Ubuntu VM.

What is Bash?

Bash is a popular text-based shell and command-language. It is the default shell included within Ubuntu and other Linux distros, and in macOS. Users type commands into a shell to execute scripts and/or run commands and tools to accomplish many tasks.

How does this work?

Check out this article on the Windows Command Line blog: A Deep Dive Into How WSL Allows Windows to Access Linux Files which goes into detail about the underlying technology.

Why would I use WSL rather than Linux in a VM?

WSL requires fewer resources (CPU, memory, and storage) than a full virtual machine. WSL also allows you to run Linux command-line tools and apps alongside your Windows command-line, desktop and store apps, and to access your Windows files from within Linux. This enables you to use Windows apps and Linux command-line tools on the same set of files if you wish.

Why would I use, for example, Ruby on Linux instead of on Windows?

Some cross-platform tools were built assuming that the environment in which they run behaves like Linux. For example, some tools assume that they are able to access very long file paths or that specific files/folders exist. This often causes problems on Windows which often behaves differently from Linux.

Many languages like Ruby and Node.js are often ported to, and run great, on Windows. However, not all of the Ruby Gem or node/NPM library owners port their libraries to support Windows, and many have Linux-specific dependencies. This can often result in systems built using such tools and libraries suffering from build and sometimes runtime errors or unwanted behaviors on Windows.

These are just some of issues that caused many people to ask Microsoft to improve Windows’ command-line tools and what drove us to partner with Canonical to enable native Bash and Linux command-line tools to run on Windows.

What does this mean for PowerShell?

While working with OSS projects, there are numerous scenarios where it’s immensely useful to drop into Bash from a PowerShell prompt. Bash support is complementary and strengthens the value of the command-line on Windows, allowing PowerShell and the PowerShell community to leverage other popular technologies.

What processors does WSL support?

WSL supports x64 and ARM CPUs.

How do I access my C: drive?

Mount points for hard drives on the local machine are automatically created and provide easy access to the Windows file system.

/mnt/ /

Example usage would be cd /mnt/c to access c:\

How do I set up Git Credential Manager? (How do I use my Windows Git permissions in WSL?)

See the tutorial Get started using Git on Windows Subsystem for Linux, which features a section on setting up Git Credential Manager and storing authentication tokens in Windows Credential Manager.

How do I use a Windows file with a Linux app?

One of the benefits of WSL is being able to access your files via both Windows and Linux apps or tools.

WSL mounts your machine’s fixed drives under the /mnt/ folder in your Linux distros. For example, your C: drive is mounted under /mnt/c/

Using your mounted drives, you can edit code in, for example, C:\dev\myproj\ using Visual Studio / or VS Code, and build/test that code in Linux by accessing the same files via /mnt/c/dev/myproj .

Are files in the Linux drive different from the mounted Windows drive?

Files under the Linux root (i.e. / ) are controlled by WSL which aligns with Linux behavior, including but not limited to:

  • Files which contain invalid Windows filename characters
  • Symlinks created for non-admin users
  • Changing file attributes through chmod and chown
  • File/folder case sensitivity

Files in mounted drives are controlled by Windows and have the following behaviors:

  • Support case sensitivity
  • All permissions are set to best reflect the Windows permissions

How do I uninstall a WSL Distribution?

To remove a distribution from WSL and delete all of the data associated with that Linux distribution, run wsl —unregister where is the name of your Linux distro, which can be seen from the list in the wsl -l command.

Additionally, you can then uninstall the Linux distro app on your machine just like any other store application.

To learn more about wsl commands, see the article, Basic commands for WSL.

How do I run an OpenSSH server?

OpenSSH ships with Windows as an optional feature. See the Install OpenSSH doc. Administrator privileges in Windows are required to run OpenSSH in WSL. To run an OpenSSH server, run your WSL distribution (ie Ubuntu) or Windows Terminal as an administrator. There are several resources out there covering SSH scenarios with WSL. Check out Scott Hanselman’s blog articles: How to SSH into a Windows 10 Machine from Linux OR Windows OR anywhere, How to SSH into WSL2 on Windows 10 from an external machine, THE EASY WAY how to SSH into Bash and WSL2 on Windows 10 from an external machine, and How to use Windows 10’s built-in OpenSSH to automatically SSH into a remote Linux machine.

How do I change the display language of WSL?

WSL install will try to automatically change the Ubuntu locale to match the locale of your Windows install. If you do not want this behavior you can run this command to change the Ubuntu locale after install completes. You will have to relaunch your WSL distribution for this change to take effect.

The below example changes to locale to en-US:

Читайте также:  Opengl �������� �� ��������� ������ linux

Why do I not have internet access from WSL?

Some users have reported issues with specific firewall applications blocking internet access in WSL. The firewalls reported are:

  1. Kaspersky
  2. AVG
  3. Avast
  4. Symantec Endpoint Protection
  5. F-Secure

In some cases turning off the firewall allows for access. In some cases simply having the firewall installed looks to block access.

How do I access a port from WSL in Windows?

WSL shares the IP address of Windows, as it is running on Windows. As such you can access any ports on localhost e.g. if you had web content on port 1234 you could https://localhost:1234 into your Windows browser. For more information, see Accessing network applications.

How can I back up my WSL distributions, or move them from one drive to another?

The best way to backup or move your distributions is via the export/import commands available in Windows Version 1809 and later. You can export your entire distribution to a tarball using the wsl —export command. You can then import this distribution back into WSL using the wsl —import command, which can name a new drive location for the import, allowing you to backup and save states of (or move) your WSL distributions.

Please note that traditional backup services that backup files in your AppData folders (like Windows Backup) will not corrupt your Linux files.

WSL 2

Does WSL 2 use Hyper-V? Will it be available on Windows 10 Home?

WSL 2 is available on all Desktop SKUs where WSL is available, including Windows 10 Home.

The newest version of WSL uses Hyper-V architecture to enable its virtualization. This architecture will be available in the ‘Virtual Machine Platform’ optional component. This optional component will be available on all SKUs. You can expect to see more details about this experience soon as we get closer to the WSL 2 release.

What will happen to WSL 1? Will it be abandoned?

We currently have no plans to deprecate WSL 1. You can run WSL 1 and WSL 2 distros side by side, and can upgrade and downgrade any distro at any time. Adding WSL 2 as a new architecture presents a better platform for the WSL team to deliver features that make WSL an amazing way to run a Linux environment in Windows.

Will I be able to run WSL 2 and other 3rd party virtualization tools such as VMware, or VirtualBox?

Some 3rd party applications cannot work when Hyper-V is in use, which means they will not be able to run when WSL 2 is enabled, such as VMware and VirtualBox. However, recently both VirtualBox and VMware have released versions that support Hyper-V and WSL2. Learn more about VirtualBox’s changes here and VMware’s changes here. For troubleshooting issues, take a look at the VirtualBox issue discussions in the WSL repo on GitHub.

We are consistently working on solutions to support third-party integration of Hyper-V. For example, we expose a set of APIs called Hypervisor Platform that third-party virtualization providers can use to make their software compatible with Hyper-V. This lets applications use the Hyper-V architecture for their emulation such as the Google Android Emulator, and VirtualBox 6 and above which are both now compatible with Hyper-V.

See the WSL issues repo for more background and discussion on WSL 2 issues with VirtualBox 6.1.

*If you’re looking for a Windows 10 virtual machine, VMWare, Hyper-V, VirtualBox, and Parallels VM downloads are available on the Windows Dev Center.

Can I access the GPU in WSL 2? Are there plans to increase hardware support?

We have released support for accessing the GPU inside of WSL 2 distributions! This means you can now use WSL for machine learning, artificial intelligence, and data science scenarios more easily when big data sets are involved. Check out the get started with GPU support tutorial. As of right now WSL 2 does not include serial support, or USB device support. We are investigating the best way to add these features.

Will WSL 2 be able to use networking applications?

Yes, in general networking applications will be faster and work better since we have full system call compatibility. However, the new architecture uses virtualized networking components. This means that in initial preview builds WSL 2 will behave more similarly to a virtual machine, e.g: WSL 2 will have a different IP address than the host machine. We are committed to making WSL 2 feel the same as WSL 1, and that includes improving our networking story.

Can I run WSL 2 in a virtual machine?

Yes! You need to make sure that the virtual machine has nested virtualization enabled. This can be enabled in your parent Hyper-V host by running the following command in a PowerShell window with Administrator privileges:

Set-VMProcessor -VMName -ExposeVirtualizationExtensions $true

Make sure to replace ‘ ‘ with the name of your virtual machine.

Can I use wsl.conf in WSL 2?

WSL 2 supports the same wsl.conf file that WSL 1 uses. This means that any configuration options that you had set in a WSL 1 distro, such as automounting Windows drives, enabling or disabling interop, changing the directory where Windows drives will be mounted, etc. will all work inside of WSL 2. You can learn more about the configuration options in WSL in the Distribution Management page. Learn more about support for mounting drives, disks, devices, or virtual hard disks (VHDs) in the Mount a Linux disk in WSL 2 article.

Where can I provide feedback?

  • Search existing issues to see if there are any associated with a problem that you are having. Note that in the search bar, you can remove «is:open» to include issues that have already been resolved in your search. Please consider commenting or giving a thumbs up to any open issues that you would like to express your interest in moving forward as a priority.
  • File a new issue. If you have found a problem with WSL and there does not appear to be an existing issue, you can select the green New issue button and then choose WSL — Bug Report. You will need to include a title for the issue, your Windows build number (run cmd.exe /c ver to see your current build #), whether you’re running WSL 1 or 2, your current Linux Kernel version # (run wsl.exe —status or cat /proc/version ), the version # of your distribution (run lsb_release -r ), any other software versions involved, the repro steps, expected behavior, actual behavior, and diagnostic logs if available and appropriate. For more info, see contributing to WSL.
  • File a feature request by selecting the green New issue button and then select Feature request. You will need to address a few questions describing your request.
  • File a documentation issue using the WSL docs repo. To contribute to the WSL docs, see the Microsoft Docs contributor guide.
  • File a Windows Terminal issue using the the Windows Terminal product repo if your problem is related more to the Windows Terminal, Windows Console, or the command-line UI.

If you’d like to stay up to date with the latest WSL news you can do so with:

  • Our command-line team blog
  • Twitter. Please follow @craigaloewen on Twitter to learn of news, updates, etc.

Источник

Оцените статью