Why **roscd** when changing the directory

Respected Professor,
Why do we write roscd to change directory to catkin_ws. Instead of writing roscd catkin_ws; cd .. can’t we just write cd catkin_ws
Similarly why do we write roscd <package_name> when changing directory to a package. Can’t we use just cd

Hello @abdulbasitisdost,

cd is a Linux command used to move between folders. roscd would be the ROS equivalent to this command. You can use any of them when working, it’s totally up to you. But for instance, in a system where you have many different ROS packages, you can directly go to any of them using roscd much more faster than you would do using cd.


1 Like