title: How to mount Windows folders in WSL automatically on startup
body: <p>When I go into WSL the <code>C</code> drive is automatically mounted at <code>/mnt/c</code>. I would further like to mount a folder <code>C:\D</code> to the mount point <code>/mnt/d</code>.</p>
  
  <p>The contents of <code>/etc/fstab</code>:</p>
  
  <pre><code>LABEL=cloudimg-rootfs   /        ext4   defaults        0 0
  /mnt/c/D        /mnt/d  none    bind
  </code></pre>
  
  <p>The contents of <code>/etc/wsl.conf</code>:</p>
  
  <pre><code># Enable extra metadata options by default
  [automount]
  enabled = true
  root = /mnt/
  options = "metadata,umask=22,fmask=11"
  mountFsTab = true
  
  # Enable DNS – even though these are turned on by default, we’ll specify here just to be explicit.
  [network]
  generateHosts = true
  generateResolvConf = true
  </code></pre>
  
  <p>When I do <code>sudo mount -a</code> then it mounts correctly. However it is not mounted at startup and running <code>mount -a</code> reports "mount: only root can use "--all" option".</p>