**Introduction :**

The Windows Subsystem for Linux (WSL) is a new Windows 10 feature that enables you to run native Linux command-line tools directly on Windows, alongside your traditional Windows desktop and modern store apps.

The Windows Subsystem for Linux 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.

**Installation :**

 - Enable developer mode from settings.

[![enter image description here][1]][1]
[1]: https://i.sstatic.net/b9RQt.png
 -

 - Open powershell/cmd as admin and enable WSL using following command

> Enable-WindowsOptionalFeature -Online -FeatureName
> Microsoft-Windows-Subsystem-Linux

you can also enable it from window features in GUI.

 - Restart your system.
 - Install distro of your choice from windows store. (Just search for eg. Ubuntu and install).
 - Access WSL using `bash` command on cmd.
 - It will ask you to set username and password for your linux user.
 - Check your distro using following command ;

> lsb_release -a

 - Install apache using following command;

> sudo apt-get install apache2

 - Start apache using following command;

> sudo service apache2 start

 - Access localhost to see if apache has been started successfully. Just open up browser of your choice and type 'localhost'.

 - Install mysql using following command ;

> sudo apt-get install mysql-server

 - Start mysql using following command ;

> sudo service mysql start

 - Access mysql to make sure it is running properly

> mysql -uroot -p

 use exit/quit command to exit mysql.

 - Install php using following command 

> sudo apt-get install php7.2

you can install php version of your choice by just mentioning the version.

 - check if php has been installed using following command;

> php -v

 - Check if you have all the modules needed by placing `index.php` having  `phpinfo()` at `/var/www/html` and accessing `localhost/index.php`
 - Install composer using following command;
> curl -sS https://getcomposer.org/installer -o composer-setup.php


 if you do not have curl, install it using `sudo apt-get install curl`

 - Make symlink of your windows magento project folder/ from where you want to access magento files in /var/www/html using ;

> sudo ln -s /mnt/c/projects/magento23 /var/www/html/magento23

Note that all the windows filesystem can be found mounted in /mnt folder.

 - cd into your symlinked folder and install magento using composer.


In my opinion the WSL way of using magento in windows is much faster than native windows and much more hassle free than installing a virtual machine and dealing with it's problems.

**Note :** Currently I have to start apache and mysql server after every restart but I will update if I can get it added to systemctl boot time.