Microsoft recently released a new feature for the Windows Subsystem for Linux version 2 (WSL2) that allows you to configure global options that will be used by all WSL2 Linux distributions installed in Windows 10. This is done through a configuration file named.wslconfig that will need to be created in a user’s %UserProfile% folder. The current options and format that can be used in a global configuration file are: kernel= # An absolute Windows path to a custom Linux kernel.
Source: https://www.bleepingcomputer.com/news/microsoft/windows-10-wsl2-now-allows-you-to-configure-global-options/

