Urgent.News

What's breaking now, across thousands of outlets.

Culture

Install Hadoop on WSL2 Ubuntu (2026): Complete Step-by-Step Guide

If you've searched "install Hadoop on WSL," you've probably found guides from 2020–2023, most written for WSL1 or old Hadoop 3.2/3.3.0 builds. This guide is different: it's WSL2-specific, uses the current Hadoop 3.5.x line, and includes the exact errors WSL throws that generic Linux guides don't warn you about — SSH not starting, slow HDFS I/O on the Windows filesystem, and JAVA_HOME issues. What…

If you've searched for how to install Hadoop on WSL, you may have come across outdated guides from 2020-2023, mainly for WSL1 or older Hadoop versions (3.2/3.3.0). This guide is specific to WSL2 and uses the latest Hadoop 3.5.x build, addressing issues like SSH not starting, slow HDFS I/O on Windows filesystem, and JAVA_HOME problems. Before beginning, ensure Windows 10 (build 19041+) or Windows 11 with WSL2 enabled and an Ubuntu distro installed, with about 20-30 minutes and 3GB free disk space available.

First, verify your WSL version by running `wsl -l -v`. If Ubuntu doesn't show VERSION 2, upgrade it using `wsl --set-version Ubuntu 2`. Next, update Ubuntu and install Java with `sudo apt update && sudo apt upgrade -y` followed by `sudo apt install openjdk-17-jdk -y`. Afterward, find your Java installation path and set JAVA_HOME accordingly.

Set up passwordless SSH, as Hadoop's start scripts rely on SSH to communicate with localhost. Install openssh-server, generate a key pair, and add it to the authorized_keys file, then start the SSH service manually. Note that this SSH service doesn't persist across WSL restarts; you'll need to run `sudo service ssh start` each time after a reboot before initiating Hadoop.

Download and extract Hadoop 3.5.0 to your home directory, avoiding the Windows-Linux filesystem boundary for better performance. Update your ~/.bashrc file with JAVA_HOME and HADOOP_HOME paths, then reload the shell. Configure Hadoop's XML configuration files in $HADOOP_HOME/etc/hadoop/, such as hadoop-env.sh, core-site.xml, hdfs-site.xml, mapred-site.xml, and yarn-site.xml, customizing them as needed with your specific path and username.

Format the NameNode only once using `hdfs namenode -format`. Start Hadoop by running `start-dfs.sh` and `start-yarn.sh`, and verify everything is running using `jps`. Finally, access the web UI in your Windows browser at http://localhost:9870 for the NameNode UI and http://localhost:8088 for the ResourceManager UI. Common errors include SSH not starting, JAVA_HOME not set, and other issues related to configuration and environment variables.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Culture

More from Saturday 15 August →