Ready for Linux

Switch with confidence

Lesson 3 of 8

Lesson 3 · Moving from here

Follow a relative path

A relative path starts from your current directory. Because projects is inside /home/learner, cd projects moves into it without repeating the full path. Slashes let you cross several levels in one command. If you lose your place, pwd shows where you are and a bare cd returns you home.

Examplecd Documents

cd changes directory. From home, this relative path moves into Documents. You can use slashes to move through more than one level. If you try this example, use a bare cd or Restart lesson before beginning the task.

Try it

Move through the relative path projects/website, then use pwd to verify your destination.

Lost? Run pwd to orient yourself. A bare cd returns home, and Restart lesson restores the starting location (~).

Your toolkit3 unlocked
pwdlscdNew
practice terminal
Ready for Linux practice environment
Type help for commands. Tab completes commands and paths. For navigation, type cd plus the start of a directory name.

Complete the task, then check your work.