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.
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 :
- I hope you installed linux destro using second step. Now you need to initialize the linux destro, for this follow this step, https://docs.microsoft.com/en-us/windows/wsl/initialize-distro . Set and remember the username and password for future use.
- Now, lets set the terminal for Visual Studio Code.
- Open VScode.
- 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.
- Now restart the VSCode, and open the terminal.
- Now, test and build you app using linux environment.
- If you wish to install node and npm, follow this guide here.
Refrences :
Comments
Post a Comment