Skip to content

Tutorial for installing root from CERN on WSL

Install dependencies

sudo apt update && sudo apt dist-upgrade
sudo apt install build-essential libtbb-dev libjpeg-dev libtiff-dev x11-apps git

Download precompiled binaries

The installation should be done in the user's home dir

Check ubuntu version

lsb_release -a

If your version is not listed below look for it on the download page.

Ubuntu 22

wget -O root.tar.gz https://root.cern/download/root_v6.40.04.Linux-ubuntu22.04-x86_64-gcc11.4.tar.gz

Ubuntu 24

wget -O root.tar.gz https://root.cern/download/root_v6.40.04.Linux-ubuntu24.04-x86_64-gcc13.3.tar.gz

Ubuntu 26

wget -O root.tar.gz https://root.cern/download/root_v6.40.04.Linux-ubuntu26.04-x86_64-gcc15.2.tar.gz

Decompress binaries

tar -xzvf root.tar.gz
rm root.tar.gz

Add to ~/.bashrc

Open the file ~/.bashrc with your editor of choice (nano, vim, ...) and add this line to the end.

source ~/root/bin/thisroot.sh