ROS 2 Setup Guide

An exhaustive guide for installing a ROS 2 development environment

View project on GitHub

Home

Install Linux on Windows with WSL

Table of Contents

This guide is for installing Ubuntu on WSL (Windows Subsystem for Linux) that lets you run Linux on Windows without using dual boot or traditional virtual machines.

Prerequisites

  • A computer with Windows 10 (version 19041 or higher) or Windows 11.
  • Latest graphics drivers. Try with Windows Update or here.

1. Install WSL command and Ubuntu

Go to Control Panel > Programs and Features > Turn Windows features on or off. Ensure that Virtual Machine Platform and Windows Subsystem for Linux are both checked then confirm. A reboot may be required at the end of the process.

Windows Feature Activation

Search for PowerShell in the Start menu, then right click on it and Run as administrator, type in the following command:

wsl --update
wsl --install -d Ubuntu-22.04

install_wsl

This command will enable the features necessary to run WSL and install the Ubuntu 22.04 distribution of Linux. You can also install other Linux distributions from the Microsoft Store.

Follow the instructions on the screen to add your username and password for the Linux distribution.

Reboot your machine to complete the WSL2 install.

2. Verify installation

Open PowerShell or Windows Command Prompt in administrator mode by right-clicking and selecting Run as administrator, enter the wsl –list –verbose command to verify that the installation was successful.

wsl --list --verbose

verify_installation

You can also open the Microsoft Store and search for Ubuntu to verify that the installation was successful.

To start Ubuntu, search for Ubuntu in the Start menu and click on the Ubuntu 22.04 app.

To verify Ubuntu version, enter the following command in the Ubuntu terminal.

lsb_release -a

ubuntu_version

3. Install Windows Terminal (optional)

Windows Terminal is a new, modern, feature-rich, productive terminal application for command-line users. If you don’t have it installed, you can install it from the Microsoft Store.

windows_terminal

To open Ubuntu in Windows Terminal, click on the down arrow and select Ubuntu 22.04.

windows_terminal_ubuntu

If you don’t see the Ubuntu profile click on the down arrow and select Settings or press Ctrl + , and do the following:

windows_terminal_settings

4. Next steps

ROS2 Installation

5. References