1. Check Ubuntu Version

lsb_release -a
Expected output:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04.2 LTS
Release: 24.04
Codename: noble

2. Set the Locale

locale
Expected output:
LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8
... (другие поля тоже en_US.UTF-8)

If your output is different, follow ROS instructions for setting locales(ТУТ).

3. Enable Required Repositories

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

4. Install CURL

sudo apt update && sudo apt install curl -y

5. Add ROS 2 GPG Key

sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key \
-o /usr/share/keyrings/ros-archive-keyring.gpg

6. Add 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

7. Install Dev Tools

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

8. Install ROS 2 Jazzy

sudo apt update && sudo apt install ros-jazzy-desktop

9. Set Environment Variables

echo "source /opt/ros/jazzy/setup.bash" >> ~/.bashrc

10. Verify Installation

printenv ROS_DISTRO
Expected: jazzy

Original links: ROS2 JAZZY GUIDE