Linux on windows 10


Extremely fast installation guide (5 steps).


Go to the windows search tab (lower-left corner), type powershell, right-mouse-click on the app, and select "Run as administrator" (give the permission if it asks). It will look similar to this :

alt 01



Copy-paste the following line into the powershell and hit ENTER. To paste into the shell, use right-mouse-click.

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

It will look like this :

alt 02

... and after a while like this :

alt 03

Do the reboot when it tells you so.



Go to the "Windows Store" either by searching for it, or by clicking its icon (it is the one that looks like a shopping bag). Then : click search, search for "Ubuntu", choose the one that says "Ubuntu 18.04 LTS", and click GET. It will look like this :

alt 04



After the download finishes, hit LAUNCH. You will see something like this :

alt 05

At the step where you create a UNIX user choose :
    • A simple username (no Greek letters, no spaces, no special characters, no upper-case letters, just a plain/simple user name like 'babis' or 'toula'), and,
    • A password that you can remember (further steps below will fail if you don't have your unix password).



Copy-paste and then hit ENTER the following line :

wget http://utopia.duth.gr/glykos/linux/winbash.sh

and after it finishes, copy-paste (and ENTER) this line :

source winbash.sh

It will look like this :

alt 06

Give your password when it asks (the one that you gave in the previous step). Don't stop it, let it run, it will take some time. When it finishes, type exit (and enter). Done !

From now on, to open the unix shell either click "Ubuntu" in the list of recent apps, or search for bash



Test that everything works.

You can test that everything has been installed correctly by typing the commands shown in the screenshots that follow. I'm sure you can figure-out what you have to type by comparing what you see on your monitor with what you see in the screenshots. Having said that, and to give just one example, for the first screenshot you'd have to type ls -lF , then cd progs , ls -l , gcc test.c -lm, ls -lF , ./a.out and finally nano test.c (hit ENTER after each command). Note that you don't have to re-type the same command many times : press the UP-arrow-key to recall previous commands.

alt Commands

nano is a text editor (like notepad or wordpad). What you see in front of you is a program written in the C programming language (and contained in the file named test.c that you've typed). Don't change the program (at least for now). You can move around the file with the arrow keys. To exit nano give CTRL-X (hold CTRL, press X).

alt Editor

Once you are out of nano and back in the unix shell, type CTRL-D to close the unix shell (CTRL-D means that you press-and-hold the CTRL key, and then hit the D key).


Advanced shell usage

If you feel comfortable with the unix shell and you want to add some bells and whistles to it (like automatic completion suggestions, fuzzy searches of files and history, a beautiful status line for the vim editor, etc), do the following :

Install some extra fonts that will be needed : Open with your browser this zip file

https://utopia.duth.gr/glykos/linux/advanced_winbash_fonts.zip .

You'll see a directory and inside it you'll find four files. Double-click on each of the four files and select INSTALL to install one-by-one the four fonts.

Open the unix shell, right-click on the top bar of the window, and select "Defaults". It will look like this :

alt 07

Go to Font and select the new font plus a font size to your liking :

alt 08

Close and re-open the unix shell. Then : copy-paste (and ENTER) this line :

wget http://utopia.duth.gr/glykos/linux/advanced_winbash.sh

and then this line (give your unix password when it asks) :

source advanced_winbash.sh

It will look like this :

alt 09

Let it run, and when it finishes, type CTRL-D to close everything.

Re-open the shell and enjoy.


Quick start guide for the new features :

  • To accept the suggestion offered by the shell, click 'RightArrow' (or type CTRL-F) :

alt adv 1

  • To see the possibilities and select between them, hit TAB (again and again) and then ENTER :

alt adv_2

  • You are trying to remember a flag for the command find, but to no avail. Type find - and hit TAB :

alt adv_0

  • You want to edit one of your files, but the only thing you remember is that its name contains the characters 'pl' and that it is a C program. Type what you know, hit CTRL-T and select the correct :

alt adv_3

  • You have a sub-directory called misc somewhere. But where ? You type 'misc', then ALT-C, select the correct, hit ENTER. You will automatically be taken to that directory :

alt adv_4

  • Once upon a time you had typed a long command with an https address. But which one ? Type https, hit CTRL-R, select the correct one, and hit ENTER :

alt adv_5

  • ... and for completeness, a screenshot of the vim editor with the airline status line (and two files open) :

alt adv_6

Reading material for the dedicated



What can go wrong

Two standard ways : (a) you have 32bit windows, (b) you have windows 10S. In both cases, the failure will come sooner than later. For the 10S case, you can easily convert to standard 10 using these instructions from Microsoft (read the info before converting).

If you have 32bit windows, you should probably try the tinycore solution distributed from the teaching page of the NMG group. There are some instructions available online for converting from 32bit windows to 64bit, but my advice is don't do it : there are usually good reasons why a manufacturer chooses to install a 32bit version and if you decide to ignore these reasons you may end-up with an unusable machine. Don't do it. Better be slow than sorry.