ROS 2 Jazzy Setup on Ubuntu (the best LTS ros2 version for ubuntu 24.04 In 2025)


✅ ROS 2 Jazzy Setup on Ubuntu




Follow these steps to install ROS 2 Jazzy on your Ubuntu system.

1. Set Locale (UTF-8)


Make sure your system supports UTF-8:

locale  # Check current locale

sudo apt update
sudo apt install -y locales
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8

export LANG=en_US.UTF-8
locale  # Verify updated locale


2. Enable Required Repositories


Enable the universe repo:

sudo apt install -y software-properties-common
sudo add-apt-repository universe


3. Add ROS 2 GPG Key & Repository


sudo apt update
sudo apt install -y curl


# Download and save ROS GPG key
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg

# Add the ROS 2 repository
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null

4. Install Development Tools (Optional)


For building ROS packages:

sudo apt update
sudo apt install -y ros-dev-tools


5. Install ROS 2

Update your system and install:


sudo apt update
sudo apt upgrade -y


Choose one of the following:

Desktop Install (Recommended):

sudo apt install -y ros-jazzy-desktop

ROS-Base Install (No GUI):

sudo apt install -y ros-jazzy-ros-base

6. Setup ROS 2 Environment

Add this line to your ~/.bashrc:

source /opt/ros/jazzy/setup.bash

Then, reload your terminal:

source ~/.bashrc

That’s it! 🚀 You’re ready to start using ROS 2 Jazzy..

All the best fro team Erabot labs!