⌨️cd
Also known as cd Command, Change Directory, Change Folder
A command that moves you into another folder. Two dots go up one.
Think of it like
Think of it like walking from one room to another. You are now in a new room.
Example
Lucy needs the web server's logs. She types cd /var/log/nginx, then ls to see them.
Why it matters
It is how you get around a server. Almost every task starts with a cd.
Definition
Example code
console
$ cd /var/log
$ cd ..
$ pwd
/varCommon mistake
Key takeaways
- 1Move in. cd and a path.
- 2Move up. cd .. goes up one.
- 3Go home. cd ~ from anywhere.