Skip to content

Instantly share code, notes, and snippets.

@rgardner
Created August 29, 2016 06:51
Show Gist options
  • Save rgardner/99d230955895fd8f14ac5b3c0e317c40 to your computer and use it in GitHub Desktop.
Save rgardner/99d230955895fd8f14ac5b3c0e317c40 to your computer and use it in GitHub Desktop.
Install WSL in Windows 10

Install WSL in Windows 10

Windows Subsystem for Linux allows you to run Linux programs in Windows!

Instructions

  1. Activate Developer Mode in Settings -> Update & Security -> For developers
  2. Enable Windows Subsystem for Linux (Beta) in Control Panel -> Programs -> Turn Windows Features On or Off
  3. Restart computer
  4. Start bash.exe and create new user

Tips

  • navigate to "/mnt/$DRIVE/Users/$USER" to get to Windows Personal Folder

How Does This Work?

  • it emulates syscalls. If a Linux syscall has a direct mapping to a Windows NT syscall, just call the Windows one. If there is not a corresponding Windows syscall (e.g. fork), lxcore.sys does some extra work in wrapping the call before calling a Windows syscall.
  • there are two filesystesms: VolFs and DriveFs. VolFs is the virtual Linux filesystem and gives you /proc, /sys /home, etc. You as a Windows user cannot access these files from Windows (I think). However, DriveFs, mounted at /mnt/$DRIVE gives you access to the Windows filesystem and its corresponding restrictions (e.g. filename characters). Thus you can use your favorite Unix tools (vim, grep, and pipes) to modify Windows files!!!! Maybe VolFs stands for Virtualization of Linux Filesystem?)

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment