Think of exploring a large museum without a graphical map. Before you walk into the next room, you want to ask three simple questions: Where am I right now? What is in this room? How do I step into another room?
In the Linux terminal, there are no folder icons to double-click. Instead, you use three short, friendly commands—pwd, ls, and cd—to move around with confidence.
1. pwd: Where Am I Right Now?
pwd stands for Print Working Directory. Typing it shows the full path of the folder you are currently standing in:
# Show your current folder path
pwd
# Example output: /home/alex
2. ls: What Is Inside This Folder?
ls stands for List. It shows the files and subfolders in your current location. Add -la if you also want to see file sizes and hidden files (names starting with a dot):
# List visible files and folders
ls
# List all files with details (including hidden ones)
ls -la
3. cd: Step Into Another Folder
cd stands for Change Directory. Give it a folder name to step inside, use .. to step back up one level, or use ~ to jump straight back to your home folder:
# Step into the Documents folder
cd Documents
# Go back up one folder level
cd ..
# Jump straight back to your home folder from anywhere
cd ~
3 Things to Remember
- Use
pwdwhenever you feel lost: It immediately tells you which folder you are in. - Use
lsbefore typing a path: Checking exact folder names prevents spelling mistakes. cd ..goes up,cd ~goes home: Two tiny shortcuts that save you from typing long paths.