I think that every web developer sooner or later comes to Linux due to it's capablities. Someone switch to macOS, someone stays on Linux but this article about how you can use full capabilities of Linux inside Windows and do not switch between systems.
- VS Code remote extensions
- Ubuntu VM without pain
- What will be next?
On this week VS Code team has presented the new way of interaction with your remote environment. Extensions enable you to open any folder in a container, on a remote machine, or in the WSL. This mean that you are not depend on your host system anymore.
When you connect to remote environment you receive full support of autocompletion, debugger, git and other great tools that installed there with good performance on your host. On VS Code's site there are few images how this interactions works:
You have no need to copy/paste files between local<-->remote environments or wait when
npm install will finish execution. You just connect and start work inside environment to which you are used to.
More information you can get there:
Last two years at work my main system was Ubuntu. I loved all the stuff I had there: automation with shell scripts, node and python feels native like, ease of setup, snap packages, docker and so on.
But at home I have Windows installed and, to be honest, it was not so good for development as Ubuntu. I tried different approaches of creation not bad development environment but in each of them I have some troubles which deprived me of the opportunity to work with comfort and think about tasks.
So the solution came to my mind when I read about remote experience in VS Code: full Linux VM with an ability to connect there and work the way I preferred to.
Download and install VirtualBox
For Hyper-V users: believe me, you will have an opportunity to use Linux version of docker without a pain
Download and install Vagrant
In short Vagrant is a CLI that allows you to setup all you need in minutes
I recommend you to create separate folder for you VMs
- In separate folder type
vagrant init ubuntu/bionic64It will download and install minimal Ubuntu image. Also it will create
Vagrantfilewhere all VM configs are stored in.
vagrant upto start VM
- In separate folder type
At this step half of work was done. Now you should install OpenSSH client, VS Code insiders and Remote Development extension pack
Now we have all that we need to develop "remotely".
From folder with
You will see configuration by which we can connect to our VM with VS Code
Inside new remote screen, provided by extension, configure connection to VM by copy-pasting the config received from previous step.
Click connect and voila - you are inside VM. Install all needed dependencies, create/clone your project and do what you needed inside true Linux environment.
Full instruction and additional capabilities of VS Code Remote available here
6th of May Microsoft has announced second generation of WSL, which will support full Linux Kernel 4.19. This mean that starting from the end of June with insider builds we no longer need even in VM overhead. All the stuff will be robust and native.
Check about WSL2 here
Thanks folks for your attention.