Install Lightweight Ubuntu and Apache Web Server on Windows10

So some of you may have heard that WSL2 (Windows Subsystem for Linux) was released last year, so in this post we will install it and run an Apache server that’s really lightweight on your Windows10 operating system.

Hi guys, thanks for visiting. This is zxer here, back again for ls /blog. I hope you find this post both informative and enlightening.

WSL 2 is a new version of the architecture in WSL that changes how Linux distributions interact with Windows.

WSL 2 has the primary goals of increasing file system performance and adding full system call compatibility.

Each Linux distribution can run as WSL 1 or as WSL 2, and can be switched between at any time. WSL 2 is a major overhaul of the underlying architecture and uses virtualization technology and a Linux kernel to enable its new features.

WSL 2 is only available in Windows 10, Version 2004, Build 19041 or higher. You may need to update your Windows version.

Now that’s out of the way, let’s begin. Tap the Windows key in the bottom left of your screen and type Windows Features.

1

You should see then option to turn Windows features on or off. Let’s click on that. In Windows features we can select what Windows programs we want our computer to run.

2

The two we want to add is Windows Subsystem for Linux and Virtual Machine Platform and click okay.

3

After you do this you will need to restart your machine. so bookmark this blog post if you are following along and return after you have rebooted.

Once you have your Windows10 machine up and running again we will open up Windows Store. So tap the Windows icon and type Store.

4

Once you’ve opened Store we will want to search for Ubuntu.

5

There’s a decent range of installations you can choose from. For this tutorial, we’re going to install Ubuntu 20.04, so click on that and hit Install.

6

The download and installation should take a few moments. When everything is ready to go you will be prompted to Launch.

7

Once you launch the app it will take a few minutes for your first Ubuntu Command line shell on Windows10. So be patient, or just make a coffee.

8

Once it’s all set up you will be prompted for a new UNIX username and password.

9

If you’ve followed on this far, thank you. We have installed Ubuntu on our Windows machine, it’s really lightweight and we want to dive in, so what do we type first?

ls of course, but we got nothing because it’s a new box. So let’s try ifconfig.

0

Let’s do that to get some normalcy to this box 🙂

01

This will now give us the option to install other tools to the Ubuntu box. So let’s install Apache Server and run a web server on this cat.

For convenience I’m going to run as root so I don’t have to enter the password each time I want to install something.

sudo su
apt install apache2

02

It’s just beautiful to look at!

Once everything is installed, start up the server.

service apache2 start

and visit /var/www/html

cd /var/www/html

03

That should be it. Let’s visit it in our web browser. Type the IP of the Ubuntu server into your Firefox or Chrome browser address bar. In our case it’s 192.168.1.6.

04

As it says on the page above, edit the index.html file to make your own Home page.

I do appreciate you reading to the end, please consider following this blog for more posts like this.

Also, if you can spare 5 bucks, please do so below, thanks! It greatly helps with our costs.

 

 

Support ls /blog

€5.00

zxer 2020-06-29

 

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.