Example
[automount]
# Set to true will automount fixed (Windows) drives (C:/ or D:/) with DrvFs under the root directory set above.
# Set to false means drives won't be mounted automatically, but need to be mounted manually or with fstab.
enabled = true
# Sets the directory where fixed drives will be automatically mounted.
# Using the slash as mounts C:\ to /c, rather than the default /mnt/c.
# root = /
# DrvFs-specific options:
# My user id and group id are both 1000 (reported by command id), so set them here with
# uid= and gid=
# case=off seems to turn of case sensitivity in DrvFS.
options = "metadata,uid=1000,gid=1000,umask=077,fmask=011,case=off"
# Process /etc/fstab when a WSL distribution is launched.
mountFsTab = true
[network]
# Network host settings that enable the DNS server used by WSL 2.
# Specify hostname (overwrites content of /etc/hostname)
hostname = DemoHost
# Setting generateHosts to false prevents WSL from the default behavior of auto-generating /etc/hosts
# The default is true
generateHosts = false
# Setting generateResolvConf to false prevents WSL from auto-generating /etc/resolv.conf, so that I
# can use a nameserver of my own choice, for example 8.8.8.8
# The default is true
generateResolvConf = false
[interop]
# Block launching Windows processing:
enabled = false
# Do not add %PATH% to `$PATH`:
appendWindowsPath = false
[user]
# Set the user when launching a distribution with WSL.
default = DemoUser
[boot]
# Enable systemd
systemd=true
# Set a command to run when a new WSL instance launches.
command = service docker start
TODO
C:\> wsl --debug-shell
Welcome to CBL-Mariner 2.0.20230630 (x86_64) - Kernel 5.15.133.1-microsoft-standard-WSL2 (hvc1)
tq84host login: root (automatic login)
root@tq84host [ ~ ]# cat /mnt/wsl/resolv.conf
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateResolvConf = false
nameserver 172.31.16.1