Skip to content
Clairos Learn

Files and paths · Lesson 6 of 36 · 8 minutes

Symbolic links

Create and inspect a simulated symbolic link.

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

Symlinks appear often in Unix configuration and deployment layouts.

mkdir
Create a directory. -p also creates missing parent directories and accepts an existing directory.

Creating a folder does not change the current directory.

ln
Create a symbolic link in the lab with ln -s.

A relative symlink target is interpreted from the link directory.

stat
Inspect a file or directory metadata record, including ownership, permissions, and size.

Metadata and file contents answer different questions.

Worked example and expected result
$ mkdir -p lab
(no output; exit 0)

Exit status: 0. The command completed successfully in the training fixture.

$ ln -s /home/learner/README.txt lab/readme-link
(no output; exit 0)

Exit status: 0. The command completed successfully in the training fixture.

$ stat lab/readme-link
Path: /home/learner/lab/readme-link
Type: link
Mode: lrwxrwxrwx
Owner: learner
Group: learners
Size: link -> /home/learner/README.txt

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 “Symbolic links”, which interpretation is safe?

Apply it elsewhere

Before adapting the ln workflow from “Symbolic links” to another server, what should you do?

Keep the momentum.

Complete the lab, then explain and apply the pattern.

Next: Archive basicsTry 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. 01Directory size mapCombine find, du, and df to reason about storage safely.Practice
  2. 02Archive basicsCreate and list a simulated tar archive.Practice
  3. 03File differencesCompare two training config files before editing either one.Practice