setup files of ros are set in setup.bash and have to be sourced everytime a terminal is open
/opt/ros/humble/setup.bash
Using ~/.bashrc
.bashrc is a file that runs by default when a terminal/shell is open. I will edit this to make the process of sourcing simpler
nano ~/.bashrc
alias humble="source /opt/ros/humble/setup.bash && echo 'ROS2 Humble activated β
'"
#alias - shortcut for long command, allows to just type humble to activate the green part
#source - runs a script
#echo - just like print() but in terminal
humble
π and itβll source ROS2 Humble for you, plus print ROS2 Humble activated β
.