How to Install Elementary OS alongside Windows

Ben Braunstein
7 min readApr 7, 2020

--

A few months ago, I wrote a blog post about my struggle trying to adapt my development environment back to Windows from macOS. You can read more about that here.

In that article, I explained what the Windows Subsystem for Linux (WSL) is and why its an awesome tool for Windows developers to use.

TLDR: WSL is a way to run a linux command line from within Windows 10 and its honestly really cool and easy to set up.

Although WSL is truly awesome and a brilliant idea from the team at Microsoft, its definitely not ideal for someone who is doing development on a daily basis. WSL works for many tasks, but on the same note it doesn’t work for some others.

One example of this is using React Native and Expo. You can use these to build native android apps and test them on your own device and run them on an android emulator on your PC. Unfortunately, this doesn't work so well using WSL.

Normally you can use Expo’s Android app on your own device and test the applications you are building on your dev machine. However, when trying to do this, the app fails every time and says it cannot connect properly.

I thought maybe it was something wrong with my device, so I installed Android Studio and created an Android Device on the same machine and then attempted to run it on the emulator, but still no luck. Expo could not find my Android device.

Then I tried a third option, connect my own android device and enable USB debugging. Then (using adb) you can use expo to run the app on your android device via the tether.

I couldn’t figure out exactly why this wasn’t working. I did some troubleshooting and searched the web and shockingly there is really little info on React Native with WSL.

Well, eventually I found a problem WSL had with each thing I tested…

For the first issue about not being able to use the Expo app to test: In WSL 2, which I was using, network interfaces are Virtualized, meaning your WSL 2 network instances can hold different IP configurations than on their Windows 10 counterparts. Normally, I would think who cares about the IP configurations, but when using expo it is crucial. The Expo app on your mobile device needs to connect to the IP of the dev machine to access the app you are working on to download and test it. However, the virtualized IPs are not able to connect with my device.

The second issue was not being able to use Android Studio’s built in device emulator. This didn’t work as well, but for a completely different reason. Android Studio (and the emulator we are using), is technically running on Windows 10 and npm (or expo) is running on Ubuntu. Although they are both running at the same time and I can visually see both of them open at the same time, they both don’t know the other exists.

I thought, well I understand that Android Studio running on Windows 10 can’t communicate with Expo running on Ubuntu, but there’s no reason I shouldn't be able to use my own device. So I installed adb (Android’s command line tool to communicate with android devices) on WSL and then tried to send it over to my device. That just wasn’t working either and I was getting really frustrated. Turns out that although WSL 2 has full system call compatibility, it is unable to access USB devices.

So what were my solutions…Well I guess it was there the whole time. Don’t run Linux through Windows 10, just run Linux separately from Windows.

I looked through some Linux Distributions and I decided to go with Elementary OS. Mainly because I liked the design of it.

For anyone who has never installed an operating system before (specifically Linux), I will guide you through the process.

How to install Elementary OS on your computer

You will need a USB Drive with preferably 8 GB or greater capacity

The first step is to create your USB Installer

Head over to Elementary OS’s website and download the OS image file.

Download Rufus from their website. I prefer the portable version.

Insert your USB drive and open Rufus, select your USB drive and the iso file. Then hit start and wait until Rufus is complete to create your Bootable USB. Shut down your computer.

Enter your PC’s boot selector (or BIOS if you can’t find it)

Most if not all computers have something called a boot selector, it is a way to select which device to boot from without having to enter the BIOS and changing the boot priority from there.

Typically, you get to the boot selector menu by pressing the F9, F10, F11 or F12 keys when your computer gets to the post screen. If your not sure which button you need to hit try performing a google search for “Computer Name boot selector key”. Once your computer is powering on repeatedly press the key until you get to the boot screen. When you finally get to the boot selector select your USB Drive.

If your computer does not have a boot selector menu enter the BIOS which is usually F2 or Del and change the boot priority, making the USB the first device.

Install Elementary OS

Follow the on screen instructions to get to the point where you select how you want to install Elementary OS.

Once your there, you have multiple options to select. My preference is to install it on a totally separate drive from your Windows Installation. Having the Operating Systems on separate drives makes things easier overall and its nice to have them fully independent of each other. However, if you only have one drive you can partition your drive and have Windows 10 on one partition, and have Elementary on the other partition.

  • If you are using one drive there is actually a button that says “Install Elementary OS alongside Windows” and that will take care of it for you.

OR

  • If you are using a separate drive you want to press the “Something Else” button and then find the drive you want to use, erase any partitions that are currently occupied. Then on the free space you need to create a partition and make the mount point a single / otherwise known as the root. Once thats done you can hit “Install Now”.

Then you have to follow through the rest of the installation, like selecting your time zone, keyboard layout, and username/password combo. The rest of the installation should continue by itself and once completed hit the restart now button.

Congrats! You installed Elementary OS on your computer!

Now you have an actually Linux installation and you should be able do whatever you want with it. It is totally independent of Windows 10 and upon each boot, you can select whether you want to use Windows or Elementary OS.

Have fun exploring Linux!

--

--