cd (change directory) lets you navigate the file system, moving from one folder to another.
Usage:
bash
cdJumps straight to your home directory — the fastest way back to base.
bash
cd /path/to/directoryMoves to a specific directory using its full path.
bash
cd ..Moves up one level, to the parent directory.
bash
cd ../..Moves up two levels, to the grandparent directory.
Why it matters:
- When you open a terminal, you typically land in your home directory by default.
cdis one of the most-used commands in daily terminal work — muscle memory pays off here.
Bonus shortcuts:
cd -jumps back to the previous directory you were in — handy for bouncing between two locations.cd ~/foldernavigates relative to your home directory from anywhere.