Ultimate Developer Setup Windows + Linux | Linux OS inside Windows without Dual boot or VM ware!!

Chirag Maniar
4 min readJan 7, 2021

What if I tell you, you don’t anymore require a dual boot or VM ware to run your Linux OS (Ubuntu, Kali, etc.)??? 😍 Yes, today we gonna set up our Windows 10 to perform all the Ubuntu features without either installing Ubuntu on VMware or Dual boot system. I’m really excited, it’s blasting my mind just by reading that this is possible!!! Let’s hit it!! 🚀

Prerequisites

👉 Windows 10 installed and running

Target Audience

➡️ Web developers

➡️ DevOps

➡️ Anyone who is in search of a convenient platform set up where one can leverage both Windows OS and Ubuntu seamlessly, simultaneously, and parallel

To understand what and how it works, it’s really eminent to understand why we need this and how much this will solve our problem?

Historically, Windows has not been the preferred OS for most web developers, but things have changed over the past couple of years. Microsoft recently launched Windows Subsystem for Linux or WSL (WSL2), allowing us to install REAL Linux distros (like Ubuntu) on Windows 10. This means you can use Linux toolchains (bash, zsh, tmux) and apps to manage the file system and run Windows apps.

Linux on Windows

Enable-Windows-Subsystem-Linux

From the start menu, open the Power Shell for Windows run it as Administrator and run the below command to enable the wsl .

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

Power shell command to enable WSL

Open the Microsoft Store and install any Linux distro. Open the MS store and search for Linux . It’ll fetch some Linux distros, from which select Ubuntu (You can choose others as well).

Linux distros for WSL

Once any of the distribution is downloaded, search it in your start. Open it and let it finish the installation process. Once it finishes, you’re ready to use Linux commands and your WSL is ready for further development.

Now, that we’re done with installation we need to set up it for the development. Though it’s like a separate Linux machine and you can follow the standard Linux installation for any package let us install some of the basic packages which can help the developer to kick start.

Node

I personally use the Windows Termninal for the use of different distros at same time. You can download it from the MS store. It’s really cool and simple to use.

Once you installed the Windows Terminal from the store, it will be something like this.

Windows Terminal

You can select any terminal available by clicking on the ➕ button beside the last tab.

It’s best to install nvm and then install the required Node version as and when required. To install the nvm, please paste the below command in your Ubuntu Terminal.

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
nvm installation window

Once the nvm installed you can use the below commands to install a specific Node version and use it.

nvm install 12.16.1node -v
npm -v

Git

To install git on your Linux distro. Use the below command:

// To install git
sudo apt install git
// To check the git version
git --version
//To setup the username and email to communitcate with any repo
git config --global user.name "Your Name"
git config --global user.email "youremal@email.com"

Now that we’re done with the Node, Git, and Linux. The developer is ready to blast with their respective development. One small extension is recommended with VS Code to smoothen your development.

Install Remote — WSL for your WSL development

Once the above extension is installed and enabled on your VS code, you can directly open any file from your WSL by simply using code ~/.bashrc . It’ll open the bashrc file in your VS Code with WSL config.

WSL VS Code session with bashrc file open

👦From Author 🚀

Today we learn how to set up the Linux distro to Windows without the VM ware or dual boot. It’ll be super easy to develop your application on windows and to manage it on the server just leveraging WSL. One is not required to switch from one OS to another just run simply one command. The advanced steps are configuring your docker, Kubernetes, and other services. I’m working on it, If I get a good response, I’ll write an article on it very soon. Stay tuned, keep developing, keep learning, and be safe!!

--

--

Chirag Maniar

Full Stack Developer | ReactJS | Angular | JavaScript | Amature Writer | Freelancer |