The Windows Subsystem for Linux (WSL) lets developers run GNU/Linux environment -- including most command-line tools, utilities, and applications -- directly on Windows, unmodified, without the overhead of a virtual machine.
You can:
- Choose your favorite GNU/Linux distributions from the Windows Store.
- Run common command-line free software such as grep, sed, awk, or other ELF-64 binaries.
- Run Bash shell scripts and GNU/Linux command-line applications including:
- Tools: vim, emacs, tmux
- Languages: Javascript/node.js, Ruby, Python, C/C++, C# & F#, Rust, Go, etc.
- Services: sshd, MySQL, Apache, lighttpd
- Install additional software using own GNU/Linux distribution package manager.
- Invoke Windows applications using a Unix-like command-line shell.
- Invoke GNU/Linux applications on Windows.
Find out more on Microsoft's Documentation page.
Installation
System Requirements
- You must be running Windows 10 version 1607 (the Anniversary update) or above, aka build
14393.0
. - If you're having trouble installing WSL, check your version or build number.
Installation Steps
There are two steps to use WSL:
- Install WSL (requires Administrative access):
- CAS-supported computers: install via Software Center.
- Privately owned/managed computers: follow Microsoft's instructions.
- Install the Linux Distribution of your choice.
- Follow Microsoft's instructions to complete that step.
Upgrading
Upgrading to WSL 2.0 can be done via Software Center (SC). The SC application will automatically make the additional Windows Optional Feature available if you're running Windows 10 release 2004.
Once upgraded, it may be desirable to convert the distributions to WSL 2.0 and set default WSL version to 2.0; the Microsoft documentation thoroughly explains how to do this.
FAQs
Take a look at Microsoft's FAQ page for the complete list of FAQs. Here are some of our favorites:
- Can I run ALL Linux apps in WSL? / Can I run GUI Applications?
- While that FAQ states that Microsoft doesn't support GUI applications via WSL, there are options.
- CAS has tested VcXsrv because of its active development, and it is available via Software Center.
- How do I access my C: drive?
- How do I uninstall a WSL Distribution?
- Can I snapshot my bash OS to revert in case I break things?
- Consider using LxRunOffline; this is unsupported by CAS.
- Backup (using 7zip or a backup tool) the package's folder:
- Debian:
C:\Users\verti\AppData\Local\Packages\TheDebianProject.DebianGNULinux_76v4gfsz19hv4
Path name may differ/change, but you can search the packages folder for your OS. - Ubuntu:
C:\Users\verti\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc
Path name may differ/change, but you can search the packages folder for your OS. - Other: Search the packages folder for your OS.
- Debian:
In general, CAS can neither help you troubleshoot WSL nor the underlying distribution; read the troubleshooting guid for help.
CAS Support
We know that using Linux Tools is important to some of your work and/or research. As such, we want to make this available to you as an option in lieu of a second computer or a dual boot system. However, we cannot support the inner workings of WSL, that's up to you. So, to re-iterate:
- CAS only supports the installation and uninstallation of WSL, not the underlying distribution.
- CAS will not help you install a Linux distribution on WSL; read the Microsoft documentation for instructions on doing that.
- CAS will help you uninstall the Linux distribution on WSL so that you can start over, but you can also do that yourself.
- CAS does not support software that is running in the WSL Linux distribution.
- CAS cannot answer questions about WSL or the WSL distribution; read the FAQ for help.