dimanche 12 juin 2016

Ubuntu 16.04 on Ubuntu on Windows (WSL)

Disclaimer

First thing first, I'm a quite average technical person. I know a bit of everything without being specialized in anything.
This actually sometimes work in my favor, as I do not fear to test "crazy" things that are, normally, not meant to go together.

Prerequisites

Windows side

  1. Be part of Windows Insider (fast ring preferred)
  2. Have the latest Windows 10 Insider release installed
  3. Install Windows Subsystem for Linux (WSL) feature

Linux side

  1. Get the Repositories list for Ubuntu 16.04
  2. Make a backup of the current sources.list
     $ sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak 
    • For information, here is the default sources.list
  3. Update the Repositories list with the list for Ubuntu 16.04

Finally the upgrade

As for any upgrade, once everything has been prepared well, the upgrade itself will (normally) only be a question of install wait.
I will, on purpose, be verbose with the commands, and if you know a bit of Linux commands, I'm sure you can do it in one line.
NOTE: as I'm posting this blog after I've done the upgrade, I have unfortunatly no printscreens to share of the upgrade itself.
  1. Update the list of packages available after the "sources.list" has been updated
     $ sudo apt-get update 
  2. Upgrade the distribution
     $ sudo apt-get dist-upgrade 
    • Type "Y" to install all the required Packages
  3. IMPORTANT: at some point in the install, you will be asked to update the rcS.d files. As the WSL has some "magic" in it, I choose to keep it as is. Really not sure if this would have an incidence or not.
    • Therefore, type "N" or just enter as it is the default when prompted for the update.
And that's actually all. It took my old pc (elitebook 8470p 4g RAM) about 20 minutes for the upgrade.
In order to be ensure everything is properly applied, I rebooted windows, as I do not know (yet) how I can reboot the WSL instance (read pico-process) itself.

I confirmed in 2 ways that ubuntu was correctly installed:

And that's all for now. My next blog post will be about another crazy idea that I also put on twitter already: have Docker runtime in WSL to manage Docker Beta for Windows.

Hopefully, this (first) blog post will help or at least give ideas for one person at least.

Darth Nunix

1 commentaire:

  1. Thanks for your tips, but doing that i got this error
    sudo: no tty present and no askpass program specified
    i Had to uninstall all and reinstall, than give root password, why do you got kernel 4.4 while mine is 3.19

    RépondreSupprimer