Shared posts

05 Aug 22:29

How to enable the Linux / Bash subsystem in Windows 10

by Mike Croucher

Like many people, I was excited to learn about the new Linux subsystem in Windows announced by Microsoft earlier this year (See Bash on Windows: The scripting game just changed).

Along with others, I’ve been playing with it on the Windows Insider builds but now that the Windows Anniversary Update has been released, everyone can get in on the action.

Activating the Linux Subsystem in Windows

Once you’ve updated to the Anniversary Update of Windows, here’s what you need to do.

Open settings


In settings, click on Update and Security


In Update and Security, click on For developers in the left hand pane. Then click on Developer mode.


Take note of the Use developer features warning and click Yes if you are happy. Developer mode gives you greater power, and with great power comes great responsibility.


Reboot the machine (may not be necessary here but it’s what I did).

Search for Features and click on Turn Windows features on or off


Tick Windows Subsystem for Linux (Beta) and click OK

Screen Shot 2016-08-05 at 15.30.08

When it’s finished churning, reboot the machine.

Launch cmd.exe

Screen Shot 2016-08-05 at 15.36.14

Type bash, press enter and follow the instructions

Screen Shot 2016-08-05 at 15.37.58

The linux subsystem will be downloaded from the windows store and you’ll be asked to create a Unix username and password.

Try something linux-y

The short version of what’s available is ‘Every userland tool that’s available for Ubuntu’ with the caveat that anything requiring a GUI won’t work.

This isn’t emulation, it isn’t cygwin, it’s something else entirely. It’s very cool!

The gcc compiler isn’t installed by default so let’s fix that:

sudo apt-get install gcc

Using your favourite terminal based editor (I used vi), enter the following ‘Hello World’ code in C and call it hello.c.

/* Hello World program */


int main()
    printf("Hello World from C\n");

Compile using gcc

gcc hello.c -o hello

Run the executable

Hello World from C

Now, transfer the executable to a modern Ubuntu machine (I just emailed it to myself) and run it there.

That’s right – you just wrote and compiled a C-program on a Windows machine and ran it on a Linux machine.

Now install cowsay — because you can:

sudo apt-get install cowsay
cowsay 'Hello from Windows'
< Hello from Windows >
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

Update 1:

I was challenged by @linuxlizard to do a follow up tutorial that showed how to install the scientific Python stack — Numpy, SciPy etc.

It’s all there :)

sudo apt-get install python-scipy

Screen Shot 2016-08-05 at 16.42.30

Update 2

TensorFlow on LinuxOnWindows is also easy:

03 May 17:08

Comment on NPDE Lecture 1 Discussion by admin

by admin

Just a note on the comments: as written below, you can use some HTML to format your posts. However, on this blog we can also use some LaTeX commands to typeset mathematics.

For an overview of LaTeX mathematics notation, look to one of the following references: 1, 2, and any others you find online.

For example,

\[ u_t-(u^m)_{xx} +b u^\beta=0\]

\[ u_t-(u^m)_{xx} +b u^\beta=0\]

22 Feb 22:37

Mentalist Keith Barry plays tricks on used car salesmen

by Mark Frauenfelder

Mentalist Keith Barry works his powers of manipulation on used car dealers and customers in this video, like figuring out exactly how much people imagine they are willing to spend on a car. (Via Dooby Brain)


19 Jul 12:04

Existence of periodic solutions for the periodically forced SIR model. (arXiv:1307.5050v1 [q-bio.PE])

by Guy Katriel

We prove that the seasonally-forced SIR model with a T-periodic forcing has a periodic solution with period T whenever the basic reproductive number R0>1. The proof uses the Leray-Schauder degree theory. We also describe some numerical results in which we compute the T-periodic solution, where in order to obtain the T-periodic solution when the behavior of the system is subharmonic or chaotic, we use a Galerkin scheme.