Build front end app in linux environment

Developer who is running windows machine and want to build and test their app in linux environment, can use Windows Subsystem for Linux feature. Through this feature you will have full fledged linux terminal to build and test your app.

1. First, make sure  Windows Subsystem for Linux feature is enabled in your windows machine.

  • Run following command from powershell. Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux Or Go to Control Panel > Programs > Turn Windows features on or off. And select, Windows Subsystem for Linux option. This feature allow you to install choice of your linux destro. You may need to restart your machine.
  • Install linux destro of your choice using options : 
    1. Download and install from the Microsoft Store
    2. Install using command line
    3. Manually download, unpack and install.
    1. Open VScode.
    2. Go to File > Preferences > Settings. Select, Features > Terminal. Edit, Integrated > Shell : Windows (Bash on Ubuntu (on Windows)) to "terminal.integrated.shell.windows": "C:\\Windows\\System32\\bash.exe". Follow the instruction from here
    3. Now restart the VSCode, and open the terminal. 
  • Now, test and build you app using linux environment. 
    1. If you wish to install node and npm, follow this guide here.
   

Refrences :

Comments