Skip to content
Clairos Learn

Terminal basics · Lesson 2 of 34 · 7 minutes

Paths and shortcuts

Practice absolute paths, relative paths, dot, dot-dot, and home shortcuts.

Mastery 0/3Run itExplain itApply it
learner@clairosSimulated Linux lab
learner@clairos:~ $
↑ history · Tab complete · Ctrl+C cancel · Esc, Tab to leaveExit 0

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.

Try a variation

Repeat this workflow in the sandbox with a different scratch filename. Keep the system fixtures unchanged and compare the observed output with your expectation before moving on.

Explain it

In “Paths and shortcuts”, which interpretation is safe?

Apply it elsewhere

Before adapting the pwd workflow from “Paths and shortcuts” to another server, what should you do?

Keep the momentum.

Complete the lab, then explain and apply the pattern.

Next: Hidden filesTry an incident drill

Anonymous 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

  1. 01NavigationMap the training server, learn where you are, and move through directories.Practice
  2. 02Hidden filesUse long and all listings to reveal dotfiles and read shell startup notes.Practice
  3. 03Command historyRun a few safe commands, review history, and clear the display without resetting state.Practice