Moving around
In the terminal, there aren’t any icons like a file manager. To move between folders, you type short commands.
Where am I?
Section titled “Where am I?”You can see your current folder with the pwd command:
pwdpwd stands for print working directory. “Directory” is just another word for folder. /home/obay is your home folder, where your Documents, Downloads and other folders are.
What’s in this folder?
Section titled “What’s in this folder?”ls# Desktop Documents Downloads Music Pictures Videosls lists the contents of the current folder.
If you want to see what’s inside another folder, you can type the path of the folder after ls:
ls Pictures# cat.jpg screenshots wallpaper.pngHow do I go to another folder?
Section titled “How do I go to another folder?”cd changes directory:
cd PicturespwdSome shortcuts:
cd .. # go up one foldercd ~ # go home (cd alone works too)cd - # go back to where you just wereA path is an address for a file or folder. There are 2 types.
An absolute path starts with / and works from anywhere. It’s the full address, starting from the very top of the system:
cd /home/obay/Pictures/screenshotsA relative path starts from the folder you’re in. If you’re already in /home/obay, these 2 do the same thing:
cd Pictures/screenshotscd /home/obay/Pictures/screenshotsSymbols you’ll see in paths:
| Symbol | Means |
|---|---|
/ |
The very top of the system (or a separator between folder names) |
~ |
Your home folder |
. |
The folder you’re in right now |
.. |
The folder above this one |
So ~/Downloads means “Downloads inside my home folder”, and ../Music means “go up one, then into Music”.
Quick check: you’re in /home/obay/Music. Where does cd ../Pictures take you?
/home/obay/Pictures. The .. goes up to /home/obay, then you go into Pictures from there.