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
Web Application Class 1. DownForEveryoneOrJustMe ...
Do you know what fonts are used in the logo desig...
Being an operation and maintenance engineer is a ...
Table of contents 01 Create invisible columns 02 ...
Table of contents Tomcat Introduction Tomcat depl...
Preface: I used the official nginx proxy_cache as...
In HTML, the Chinese phrase “學好好學” can be express...
Encapsulate el-dialog as a component When we use ...
This article discusses the difficulties and ideas...
Previously, the images we used were all pulled fr...
Recently, when I was using Linux to log in locall...
This article shares the specific code of Vue to i...
Preface The requirement implemented in this artic...
<br />It has been no more than two years sin...
Table of contents Preface Ajax serial and paralle...