DEV Community

Ihor Klymenok
Ihor Klymenok

Posted on • Edited on

How to setup full Linux desktop environment on Windows

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.

Contents:

  • VS Code remote extensions
  • Ubuntu VM without pain
  • What will be next?

VS Code remote extensions

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:

Ubuntu VM without pain

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.

Step-by-step guide:

  1. Download and install VirtualBox
    For Hyper-V users: believe me, you will have an opportunity to use Linux version of docker without a pain

  2. Download and install Vagrant
    In short Vagrant is a CLI that allows you to setup all you need in minutes

  3. I recommend you to create separate folder for you VMs

    • In separate folder type vagrant init ubuntu/bionic64 It will download and install minimal Ubuntu image. Also it will create Vagrantfile where all VM configs are stored in.
    • vagrant up to start VM

At this step half of work was done. Now you should install OpenSSH client, VS Code insiders and Remote Development extension pack

  1. Install OpenSSH with PowerShell

  2. Install VS Code insiders

  3. Install Remote Development extension pack in VS Code

Now we have all that we need to develop "remotely".

  1. From folder with Vagrantfile type vagrant ssh-config
    You will see configuration by which we can connect to our VM with VS Code

  2. Inside new remote screen, provided by extension, configure connection to VM by copy-pasting the config received from previous step.

  3. 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

What will be next?

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.

Top comments (0)