Skip to content
Christopher Strøm edited this page Nov 1, 2020 · 7 revisions

Useful Linux commands

Most of the things in linux are done thorugh the Terminal. Here is a list of the most used commands:

Command Description
ls Lists files and folders
cd Change the working directory to
cp Copies to
mv Moves to
sudo Executes the command as the root user
mkdir Creates a directory in your working directory named
rm -rf Remove
gedit or nano Opens a text editor to edit
sudo apt Installs in Ubuntu
chmd +x Makes executable

Sourcing

The terminal needs to know the location of the ros installation and the current workspace. This is done by adding the locations to the bashrc file, which is run everytime a terminal window is stared. This process is called sourcing.

The following command can be used to edit the bashrc file (use gedit, nano or vim as editor)

nano ~/.bashrc

Make sure the following lines at the bottom of the file (current workspace is usually vortex_ws or catkin_ws)

source /opt/ros/<ros distro>/setup.bash
source ~/<current workspace>/devel/setup.bash

Remember to reopen the terminal or to rerun bashrc after changing it eg

source ~/.bashrc
Clone this wiki locally