Skip to content

Instantly share code, notes, and snippets.

@HallexCosta
Last active May 3, 2021 16:11
Show Gist options
  • Save HallexCosta/82148c489fc0ec2476a1b100477d5b7e to your computer and use it in GitHub Desktop.
Save HallexCosta/82148c489fc0ec2476a1b100477d5b7e to your computer and use it in GitHub Desktop.
Set default root dir in WSL
# Or use the command for create and write in file
cat >/etc/wsl.conf <<EOL
# Enable extra metadata options by default
[automount]
enabled = true
root = ~/
options = "metadata,umask=22,fmask=11"
mountFsTab = false
# Enable DNS – even though these are turned on by default, we'll specify here just to be explicit.
[network]
generateHosts = true
generateResolvConf = true
EOL
# add in /etc/wsl.conf
# Enable extra metadata options by default
[automount]
enabled = true
root = ~/
options = "metadata,umask=22,fmask=11"
mountFsTab = false
# Enable DNS – even though these are turned on by default, we'll specify here just to be explicit.
[network]
generateHosts = true
generateResolvConf = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment