Stage 2 · Lesson 1 of 9
Paths and moving around
Every file on a system sits in one big tree of folders that starts at /, called the root. A path is the address of a file in that tree. An starts from the root, such as /home/sara/code.
A relative path starts from the folder you are in now, such as code/app. A few shortcuts help: ~ means your , . means the current folder and .. means the folder above. Use pwd to print where you are, ls -la to list everything including , and cd to move.
cd - jumps back to where you were. Press Tab to finish file names for you, which prevents typos. Every later command, including the in the next topic, depends on knowing where you are.
Common traprunning a command in the wrong folder because you never checked.
A question to check yourself, an AI practice session and 2 cheat sheet entries come when you add the roadmap to your account. Add it
Resources for this stage
Start with· follow one of these
- CourseFreeThe Missing Semester of Your CS Education
MIT · Beginner
MIT's lectures on the shell and shell tools, with exercises after each one
- BookFreeThe Linux Command Line
William Shotts · Beginner
A free book that explains the shell step by step; the first part covers this whole stage
Practise
Keep handy
Also worth your time
- roadmap.sh: Shell / BashGo deeper
The full map of shell and Bash topics, to see what comes after the basics