Do you know that one guy in every group who can just throw up a topic and the whole group will just waste all their time by discussing that topic. And the guy will just finish all the chips on the table. Do you want to be that guy ?. If you happen to have computer nerd friends as I do, a lot of them, in one of your group meetings just say this a bit loudly, Which do you guys think is better, Linux or Windows ?. Make sure you remove any sharp objects from the room or anything in general that may eventually lead to loss of human lives. Trust me, shit happens. I am fairly sure, the guy who thought of giving the ability to install ubuntu on windows 10 went through something like this.
Anyhoo, in this post I am going to tell you how exactly can you
Install Ubuntu On Windows 10,
It’s nice isn’t it.
People being diplomatic and trying to bring people together. It’s nice.
I think its nice.
The pre-requisite to install ubuntu in Windows 10 is to have your windows updated to the windows 10 fall creators update.
For all you curious heads who are wondering how did Microsoft do that.
Partnering with one of the leading Linux developers Canonical, it developed the Windows Subsystem for Linux or WSL as the geek around the world call it.
This enables us to effectively install the core of Ubuntu Linux OS inside of Windows, without even the need for a initiate a virtual machine non-sense.
Just like that. Noice.
Why do that you may ask ?
You may rightly ask, why install ubuntu on windows 10 at the first place.
Well, don’t feel stupid. It’s a good question.
See, you know what this Linux business is. Why people love it. The simple reason is .. wait wait..
Jungle. yes.
That’s the right analogy.
For geeks and developers Linux is like an open forest. It allows them to explore the river side, create swings, swing on them let other people use your swing.
You can create an archery range and help others learn your archery skills. You get the point.
Windows and iOS are like this really awesome palaces with huge stone walls. enjoy what you have and shut the hell up kinda situation.
I think Microsoft rightly realized that shiny walls are nice but it is good to let the inner curiosity find paws in the jungle.
Anyhoo,
This is how to do it.
Getting your PC ready.
Once you have updated windows to the 2017 fall creators update, which is Windows build 16215, aka Redstone 3, there’s nothing much to do actually.
Hit the start button and type “powershell” as shown in the figure.
Right click and select Run as Administrator.
Once that is done you will see a screen like this.
Type the following command on the screen.
Don’t bother the explanation. Let’s focus on the fruit at the moment.
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Installing Linux
Easy peasy.
Head to the windows store and search for Linux.
What you will see is a butt load of linux based apps.
Hah, Linux apps on windows store who would have thought. Well, whatever keeps the ball rolling I guess.
We are obviously interested in Ubuntu so choose it from the various apps you see and click get it.
Setting Up Linux
Before we can do anything with the Linux magic we need to set certain things up.
Firstly, choose a username and password for a user account in ubuntu.
Secondly, we need to input some of those linux incantations to get things in order.
They are as follows :
sudo apt-get update
sudo apt-get upgrade
These commands just ensure that your ubuntu has the latest packages and is up to date.
Installing a GUI
At this point you will only have that text-based terminal to work with.
As enticing as it feels to developers and linux ninjas, we will still install a GUI in our case to include all the beginners looking forward to learning ubuntu in a user friendly manner.
The cool thing is Linux environment uses a graphical system called X to generate its GUI.
Are you seeing why people wish to become Ninjas in this OS yet ?. No.
Wait a little more.
The GUI base X uses a server /client model, which in simple terms means you will be able to access over various systems and sub-systems in a network.
- By the way there is a separate device launched by the geek overlords called Raspberry Pi. It in simple terms is a device singing the glory of linux. Check all about it here.
For the server requirements we are going to install windows based X server called Xming. Download and install it from here.
Once the windows based X server is installed, the Linux client will be able to launch GUI-based X-tools.
Messing with Ubuntu
With the windows background work done. We now need to hitch any GUI activity with the correct display. For that to happen type,
export DISPLAY=:0.0
If you want to permanently set this display environment variable, type:
echo “export DISPLAY=:0.0” >> ~/.bashrc
Now you might be curious as to what all of this is actually doing.
These commands add a directive to run a script each time you start ubuntu, the bash shell part to be precise.
Still, let me make it even easier for you, if you are a beginner don’t focus on the command just try to have an holistic overview as to what is being done.
What is really happening is we are trying to latch a GUI to our Linux to make everything user friendly.
Truth b told you can install ubuntu on windows 10 without the GUI part but since we are also taking beginner linux learning people into account I just wanted to be thorough.
Let’s install a graphical program now. Type :
sudo apt-get install gedit
Once installed, type gedit to run it. Note that it may take sometime to install it.
Installing a desktop
A little bit of research for this online, and you will see google throwing up a bunch of results involving Dbus fixes.
They are no longer required because they are now a part of default Ubuntu install.
What this non-sense means is installing a desktop for linux is easy now. All you need to do is type these commands.
1.sudo apt install xfce4
2.sudo apt install gnome-themes-standard
3.sudo apt install conky
We are opting for a lightweight one called Xfce4.
Preparing the desktop
We are almost done with our procedure to install ubuntu on windows 10.
Just a few clean up steps. Just follow along.
Run the command,
nano ~/.xinitrc
You will see a text editor open up. Enter the following lines into the text editor.
#!/usr/bin/env bash
export LANG=”en_US.UTF-8”
export LC_ALL=”en_US.UTF-8”
exec startxfce4
Once done press ctrl + o and hit return to save the file and ctrl + x to exit the editor.
Now run chmod +x ~/.xinitrc to convert the file we just created into an executable one.
Then use,
ln -s ~/.xinitrc ~/.xsession
to link the file with X configuration file.
Start the newly installed Linux desktop with,
dbuslaunch –exit-with-session ~/.xsession
In the first run, a dialog box pops up – select to use the default.
Just monkey around with certain self-explanatory settings for your ease of use.
Note that you won’t find too much to work with around at this point. Start adding programs that you wish to work with for example firefox by typing,
sudo apt-get install firefox
and then you will be able to find firefox in the “internet menu“. Go nuts.
So there we have it boys, your one stop guide to install ubuntu on windows 10.
Now I will agree that things got a little bit more technical on this one. But its not something to ponder over for too long as you get comfortable with using Linux or tech stuff regarding linux in general thing will get pretty clear along the way.
For now as I already said, just have an overview on what is happening and enjoy the learning that follows.
I will see you in the next one.
Namaskaram 🙂 _/\_