Linux for Developers
/Beginner
cd
Definition
Change Directory. The command used to navigate and switch between different directories in the filesystem.
Explain Like I'm New
Walking through doors. If you are in the living room and want to go to the kitchen, you type `cd kitchen`.
Real World Example
Typing `cd /var/log` jumps you instantly to the system logs folder. Typing `cd ..` moves you exactly one folder backwards (up) the tree. Typing just `cd` instantly teleports you back to your personal home folder.
Common Use Cases
- •Filesystem navigation
Interview Questions
basic
- What does the command `cd ..` do?
intermediate
- What is the difference between `cd /var` and `cd var`?