https://docs.microsoft.com/en-us/windows/wsl/wsl-config .wslconfig
Check which version of WSL you are running. Note Adjusting per-distribution settings with the wsl.conf file is only available in Windows Build 17093 and later. Configuration setting for .wslconfigThe .wslconfig file configures settings globally for all Linux distributions running with WSL 2. (For per-distribution configuration seewsl.conf). See .wslconfig for info on where to store the .wslconfig file. Note Global configuration options with This file can contain the following options that affect the VM that powers any WSL 2 distribution: Section label:
Entries with the Entries with the Entries with an * after the value type are only available on Windows 11. Example .wslconfig file The # Settings apply across all Linux distros running on WSL 2 [wsl2] # Limits VM memory to use no more than 4 GB, this can be set as whole numbers using GB or MB memory=4GB # Sets the VM to use two virtual processors processors=2 # Specify a custom Linux kernel to use with your installed distros. The default kernel used can be found at https://github.com/microsoft/WSL2-Linux-Kernel kernel=C:\\temp\\myCustomKernel # Sets additional kernel parameters, in this case enabling older Linux base images such as Centos 6 kernelCommandLine = vsyscall = emulate # Sets amount of swap storage space to 8GB, default is 25% of available RAM swap=8GB # Sets swapfile path location, default is %USERPROFILE%\AppData\Local\Temp\swap.vhdx swapfile=C:\\temp\\wsl-swap.vhdx # Disable page reporting so WSL retains all allocated memory claimed from Windows and releases none back when free pageReporting=false # Turn off default connection to bind WSL 2 localhost to Windows localhost localhostforwarding=true # Disables nested virtualization nestedVirtualization=false # Turns on output console showing contents of dmesg when opening a WSL 2 distro for debugging debugConsole=true This is the end of this article about WSL configuration modification in docker. For more relevant WSL configuration modification content in docker, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: What is MIME TYPE? MIME-Types type collection
>>: Detailed explanation of how to use $props, $attrs and $listeners in Vue
This article example shares the specific code of ...
Table of contents 1. Introduction 2. Environment ...
This article example shares the specific code of ...
This tutorial shares the process of manually inst...
Table of contents 0. The kernel tree that comes w...
<br />Hello everyone! It’s my honor to chat ...
At the beginning of this article, I would like to ...
Sophie Hardach Clyde Quay Wharf 37 East Soapbox Rx...
Event loop in js Because JavaScript is single-thr...
Table of contents Implementation ideas: Step 1: C...
Table of contents 1. Preface 2. Find two pop-up c...
Result:Implementation code: html <link href=...
Let’s learn together 1. Traditional methods Copy ...
When processing batch updates of certain data, if...
//grammar: @media mediatype and | not | only (med...