Vaibhav Shende Vaibhav Shende

Ubuntu Initial Setup for Robotics Engineers: A Complete Checklist

Everything you need to do after installing Ubuntu 22.04 for robotics work—recommended software, cleanup, developer tools, and optimizations.

Robotics

Ubuntu Initial Setup for Robotics Engineers: A Complete Checklist

Why This Guide?

You’re going to install Ubuntu multiple times. New hardware. System corruption. OS upgrades. Fresh starts. Every time, you’ll stare at a blank desktop wondering: What do I install first? What do I remove? How do I organize this?

This is your checklist. Everything a robotics engineer needs, organized from system setup through development tools.


Phase 1: System Updates and Cleanup

1.1 Update Everything

sudo apt update
sudo apt upgrade -y
sudo apt autoremove -y
sudo apt autoclean -y

Ubuntu ships with apps you probably won’t use. Remove them to free space:

# Remove snap packages (optional, can slow system startup)
sudo snap remove --purge firefox
sudo snap remove --purge ubuntu-web-content
sudo apt remove -y snapd
 
# Remove LibreOffice if not needed
sudo apt remove -y libreoffice-*
 
# Remove Games
sudo apt remove -y gnome-games aisleriot
 
# Remove Thunderbird email client (if not using)
sudo apt remove -y thunderbird
 
# Remove other unnecessary packages
sudo apt remove -y evolution ubuntu-web-content

Note: If you’re unsure about removing something, skip it. You can always uninstall later.

1.3 Enable Additional Repositories

# Add Universe repository (community maintained packages)
sudo add-apt-repository universe
 
# Add Multiverse repository (restricted packages)
sudo add-apt-repository multiverse
 
# Update package lists
sudo apt update

Phase 2: Developer Tools and Dependencies

2.1 Essential Build Tools

sudo apt install -y \
    build-essential \
    cmake \
    git \
    curl \
    wget \
    nano \
    vim \
    htop \
    net-tools \
    openssh-server \
    openssh-client

What each does:

  • build-essential — C/C++ compiler, make, linker
  • cmake — Build system for many projects
  • git — Version control
  • curl/wget — Download files from terminal
  • nano/vim — Text editors
  • htop — System resource monitor
  • net-tools — Network utilities (ifconfig, netstat)
  • openssh — Remote access

2.2 Python Development

sudo apt install -y \
    python3 \
    python3-dev \
    python3-pip \
    python3-venv \
    python3.10-venv
 
# Upgrade pip
python3 -m pip install --upgrade pip

2.3 Git Configuration

# Set your Git identity (important for commits)
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
 
# Optional: Set default editor
git config --global core.editor "nano"  # or "vim"

Phase 3: ROS 2 Installation

3.1 Add ROS 2 Repository

# For Ubuntu 22.04 (Jammy), install ROS 2 Humble
sudo apt install software-properties-common -y
sudo add-apt-repository universe -y
 
# Add ROS 2 GPG key
sudo curl -sSL https://raw.githubusercontent.com/ros/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
 
# 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
 
sudo apt update

3.2 Install ROS 2 Humble

# Desktop installation (recommended for robotics)
sudo apt install -y ros-humble-desktop
 
# Source setup script
echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc
source ~/.bashrc
 
# Verify installation
ros2 --version

3.3 Install Development Tools

# colcon - build system
sudo apt install -y python3-colcon-common-extensions
 
# rosdep - dependency manager
sudo apt install -y python3-rosdep
sudo rosdep init
rosdep update

Phase 4: Robotics-Specific Software

4.1 Gazebo Simulator

# Gazebo with ROS 2 Humble integration
sudo apt install -y ros-humble-gazebo-*

4.2 MoveIt (Motion Planning)

sudo apt install -y ros-humble-moveit

4.3 CARLA Simulator

For autonomous driving research:

# See: Installing CARLA 0.9.16 on Ubuntu 22.04: The Definitive Guide
# Or follow the guide at: /blog/carla-0916-ubuntu-2204-setup

4.4 Visualization Tools

sudo apt install -y \
    ros-humble-rviz2 \
    ros-humble-rqt-* \
    ros-humble-plotjuggler

What each does:

  • rviz2 — 3D visualization for ROS topics
  • rqt-* — ROS graphical tools (graph, plot, console, etc.)
  • plotjuggler — Data visualization and playback

Phase 5: Development Environment

5.1 Visual Studio Code

# Add Microsoft repository
sudo apt install software-properties-common apt-transport-https wget -y
wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main"
 
# Install VS Code
sudo apt update
sudo apt install -y code
 
# Install useful extensions
code --install-extension ms-python.python
code --install-extension ms-python.vscode-pylance
code --install-extension clangd.clangd
code --install-extension ms-vscode.cmake-tools
code --install-extension DavidAnson.vscode-markdownlint
code --install-extension ms-vscode-remote.remote-ssh

5.2 Docker (Optional but Useful)

# Install Docker
sudo apt install -y docker.io
 
# Add current user to docker group (avoid sudo for docker commands)
sudo usermod -aG docker $USER
newgrp docker
 
# Start Docker service
sudo systemctl start docker
sudo systemctl enable docker  # Auto-start on boot
 
# Verify installation
docker --version

5.3 Git Clients

# GitHub CLI
sudo apt install -y gh
 
# Configure GitHub CLI
gh auth login

Phase 6: NVIDIA GPU Support (For GPU Work)

6.1 NVIDIA Drivers and CUDA

Follow How I Set Up NVIDIA Driver and CUDA on My RTX 5070 Ti: A Real Setup Guide for detailed instructions.

Quick version:

# Install NVIDIA driver
sudo apt install -y nvidia-driver-550
 
# Reboot
sudo reboot
 
# Verify
nvidia-smi

6.2 CUDA Toolkit and cuDNN

See the NVIDIA guide for comprehensive CUDA installation.

6.3 PyTorch with GPU Support

python3 -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118

Phase 7: Desktop Customization (Optional)

7.1 Useful GNOME Extensions

# Install GNOME extensions manager
sudo apt install -y gnome-shell-extensions gnome-shell-extension-manager
 
# Then use the manager to install:
# - "Dash to Dock" — taskbar customization
# - "AppIndicator and KStatusNotifierItem Support" — system tray icons
# - "Vitals" — CPU/memory/temperature monitor

7.2 Terminal Improvements

# Install zsh (optional, better than bash)
sudo apt install -y zsh
 
# Install Oh My Zsh (zsh configuration framework)
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
 
# Set zsh as default shell
chsh -s $(which zsh)

7.3 Wallpaper and Theme

# Install additional themes
sudo apt install -y ubuntu-gnome-wallpapers ubuntu-wallpapers-jammy

Phase 8: System Configuration

8.1 Disable Unnecessary Services

# Disable Bluetooth if you don't need it
sudo systemctl disable bluetooth.service
sudo systemctl stop bluetooth.service
 
# Disable CUPS (printing) if no printers
sudo systemctl disable cups.service

8.2 Configure SSH (If Needed)

# Generate SSH key if you don't have one
ssh-keygen -t ed25519 -C "your.email@example.com"
 
# Add key to SSH agent
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_ed25519
 
# Copy public key for GitHub/GitLab
cat ~/.ssh/id_ed25519.pub

8.3 Firewall Configuration

# Enable UFW firewall
sudo ufw enable
 
# Allow SSH (if accessing remotely)
sudo ufw allow 22/tcp
 
# Allow other services as needed

Phase 9: Workspace Organization

9.1 Create Project Directories

# Create a standard workspace structure
mkdir -p ~/Projects
mkdir -p ~/ros2_ws/src
mkdir -p ~/carla-sim
mkdir -p ~/data
mkdir -p ~/Downloads
 
# Initialize ROS 2 workspace
cd ~/ros2_ws
colcon build

9.2 Create Useful Aliases

Add to ~/.bashrc:

# ROS 2
alias ros2-source='source /opt/ros/humble/setup.bash'
alias ros2-build='colcon build --symlink-install'
 
# Projects
alias projects='cd ~/Projects'
alias ros2='cd ~/ros2_ws'
 
# System
alias update='sudo apt update && sudo apt upgrade -y'
alias clean='sudo apt autoremove -y && sudo apt autoclean -y'
 
# Development
alias py='python3'
alias gitlog='git log --oneline -10'

Then reload:

source ~/.bashrc

Phase 10: Productivity Tools (Optional)

10.1 Documentation and Note-Taking

# Markdown editor with preview
sudo apt install -y typora
 
# Or lightweight alternative:
sudo apt install -y gedit

10.2 System Utilities

sudo apt install -y \
    chromium-browser \
    vlc \
    flameshot \
    gimp

What each does:

  • chromium-browser — Web browser
  • vlc — Video player
  • flameshot — Screenshot tool
  • gimp — Image editor

10.3 Package Managers

# Flatpak (for containerized apps)
sudo apt install -y flatpak
 
# Snap (usually pre-installed, but ensure it's not completely removed)
sudo apt install snapd

Phase 11: Final System Optimization

11.1 Enable Automatic Updates

# Install unattended-upgrades
sudo apt install -y unattended-upgrades
 
# Configure auto-update (optional, configure as needed)
sudo dpkg-reconfigure -plow unattended-upgrades

11.2 Disk Usage Check

# Check disk space usage
df -h
 
# Find large directories
du -sh ~/* | sort -h

11.3 System Cleanup

# Remove old kernel packages
sudo apt autoremove -y
sudo apt autoclean -y
 
# Clean package cache
sudo apt clean

11.4 Verify Everything

# Check ROS 2
ros2 --version
 
# Check Python
python3 --version
 
# Check Git
git --version
 
# Check build tools
cmake --version
gcc --version

Checklist: Quick Reference

Use this as your setup checklist:

[ ] System updates (apt update/upgrade)
[ ] Remove bloatware
[ ] Enable repositories (universe, multiverse)
[ ] Install build tools
[ ] Install Python
[ ] Configure Git
[ ] Add ROS 2 repository
[ ] Install ROS 2 Humble
[ ] Install colcon and rosdep
[ ] Install Gazebo
[ ] Install MoveIt
[ ] Install VS Code
[ ] Install Docker (optional)
[ ] Install NVIDIA drivers and CUDA (if needed)
[ ] Install visualization tools (rviz2, rqt)
[ ] Create workspace directories
[ ] Configure SSH keys
[ ] Set up aliases
[ ] Final system cleanup

Time-Saving Tips

  1. Save this page as a bookmark — you’ll reference it often
  2. Create a setup script — Automate these commands into a bash script
  3. Use virtual machines — Test setup changes in a VM before applying to main system
  4. Backup your work — After setup, create a system snapshot or backup
  5. Document your system — Keep notes on what you’ve installed and why

Troubleshooting

Can’t install a package?

# Clear apt cache and try again
sudo apt clean
sudo apt update
sudo apt install <package-name>

Permission denied errors?

# Add yourself to necessary groups
sudo usermod -aG sudo $USER
sudo usermod -aG docker $USER
 
# Log out and back in for group changes to take effect

ROS 2 not found?

# Make sure setup script is sourced
source /opt/ros/humble/setup.bash
 
# Add to ~/.bashrc to make it permanent
echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc

Next Steps

After initial setup, you might want to:

  1. Install additional ROS 2 packages — as needed for specific projects
  2. Set up a Git repository — for version control
  3. Configure your IDE — VS Code extensions, clang settings
  4. Create a development workspace — organize projects
  5. Back up your system — create a fresh system snapshot

Resources


Last updated: June 2026 | Tested on Ubuntu 22.04 LTS