To go back two levels in the directory structure at once, you use the following command:
cd ../..
Breakdown:
- The first
..represents the parent directory. - The forward slash
/is a separator. - The second
..represents the parent of that directory.
So, if you are currently in /home/labex/project:
cd ..would take you to/home/labex.cd ../..would take you all the way back to/home.
Just like before, remember to keep a space after the cd command!