Paths and shortcuts
Practice absolute paths, relative paths, dot, dot-dot, and home shortcuts.
Understand the pattern
Path mistakes are a common cause of editing or deleting the wrong file.
cd- Change the shell working directory; .. selects the parent and ~ identifies your home.
Changing directories changes how later relative paths resolve.
pwd- Print the directory that relative paths currently resolve from.
A relative path is interpreted from the working directory, not necessarily the home folder.
Worked example and expected result
$ cd projects(no output; exit 0)
Exit status: 0. The command completed successfully in the training fixture.
$ pwd/home/learner/projects
Exit status: 0. The command completed successfully in the training fixture.
$ cd ~(no output; exit 0)
Exit status: 0. The command completed successfully in the training fixture.
Explain it
Apply it elsewhere
Keep the momentum.
Complete the lab, then explain and apply the pattern.
Next: Hidden filesTry an incident drillAnonymous lesson and mastery progress lasts for this session. Sign in to keep synced lesson XP between sessions; mastery stays device-local. No speed bonus, lost lives, or hint penalties.
Keep learning
- 01NavigationMap the training server, learn where you are, and move through directories.Practice
- 02Hidden filesUse long and all listings to reveal dotfiles and read shell startup notes.Practice
- 03Command historyRun a few safe commands, review history, and clear the display without resetting state.Practice