Search code examples
zshwindows-subsystem-for-linuxpengwin

How to add or remove /mnt/c/ in WSL 2 with Pengwin and zsh


I have two Windows machines with WSL 2/Pengwin/zsh here and the first one shows prompt and refers to files and folders in Windows as /c/... but the second as /mnt/c/... for one and the same folder or file in Windows. I'm not sure which one I like better yet but surely I'd like to be able to switch between the two modes. Is this possible?


Solution

  • pengwin-setup made the change from /mnt/c to /c when you installed docker. This change is located in this file: /etc/wsl.conf

    [automount]
    **root=/**
    enabled = true
    options = "metadata,uid=1000,gid=1000,umask=0022,fmask=11,case=off"
    mountFsTab = true
    crossDistro = true
    

    Change root=/mnt to change to the default behavior or simply delete the root line.

    Restart Windows to apply the change