Suggesting to add complete ROOT Installation Instructions for WSL (Ubuntu 18.04 on Windows 10)

Dear ROOTers,

I feel it would be useful to have installation and execute instructions for ROOT 6 in Windows Subsystem for Linux. This request is motivated by more and more students wanting to run ROOT on Windows without any special Linux VM, but still wanting to use Makefiles from their course, potentially CMake and gcc without major effort (so running “natively” on Windows would not fit).

Even though I am more than happy about any student using native Linux or even migrating to it, not all students can be easily convinced :wink:. We have had great success using WSL on Windows 10 here. The basic steps are:

  1. Install WSL ( https://aka.ms/install ) and then Ubuntu 18.04 from the Windows Store. The first step is not needed anymore for most recent Windows 10 versions, I think.
  2. Start the freshly installed Ubuntu Bash shell and install the dependencies and some build tools:
    sudo apt update && sudo apt dist-upgrade
    sudo apt install build-essential libtbb-dev libtiff5 x11-apps git
  3. Now there’s no graphics, since WSL does not ship any X server. You can fix that e.g. by installing Xming and then running inside the Bash shel:
    export DISPLAY=localhost:0.0
    Xming needs to be running when using this setup!
  4. Now, the regular Ubuntu 18.04 instructions apply, i.e. download the tarball from the ROOT webpage (with wget), extract it, run source root/bin/thisroot.sh and you can run ROOT with graphics!

Do you think instructions like this could be useful on the ROOT webpage?

Cheers,
Oliver

3 Likes

Hi @olifre
thank you for your post! I took the liberty to slightly modify the title to reflect the fact that you are providing the instructions rather than asking for them. I’m sure this thread will be googled for quite a bit :smile:

About adding them to the ROOT webpage, let’s see what @Axel thinks :smiley:

Cheers,
Enrico

Hi @eguiraud,

many thanks! Yes, the title is much more SEO-optimized now :wink:. Indeed, let’s see what @Axel thinks - to give some addtional information, we have by now needed it in at least one course (C++ in High Energy Physics, students use ROOT for projects) and a lab course experiment (students learn how to analyze data event-by-event with ROOT from scratch) at our University. It seems WSL is becoming more and more common.

I hope the instructions will not need much changes with WSL 2.0 (which should only simplify things for the users but not change the way to use it, see e.g. https://devblogs.microsoft.com/commandline/shipping-a-linux-kernel-with-windows/ ) - I think the only drawback of the instructions is that Windows 10 is always a moving target, but it’s not moving too fast.

Cheers and thanks,
Oliver

1 Like

I have added it to the #howto:faq at Complete ROOT Installation Instructions for WSL (Ubuntu 18.04 on Windows 10) - thanks a lot, @olifre!

Already used this once :smiley:

@Axel Thanks, we will make good use of that and link to it ;:wink:
@eguiraud That was fast, but confirms there are many users wanting this. When WSL 2 becomes stable, I’ll give it a go and if necessary provide upgraded instructions :smile:.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.