Skip to content
Clairos Learn

Nano and editing · Lesson 3 of 27 · 9 minutes

Edit and verify

Create a runbook, count its lines, and inspect metadata after saving.

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

Verification catches wrong paths, failed saves, and stale assumptions.

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

Creating a folder does not change the current directory.

nano
Edit a virtual text file using the browser editor and explicitly save it.

Opening the editor does not complete a write task. Save and verify the contents.

wc
Count input. -l counts newline characters, -w counts whitespace-delimited words, and -c counts bytes.

Text without a final newline may have fewer counted lines than visible rows.

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.

$ nano lab/runbook.txt
Opening simulated nano for /home/learner/lab/runbook.txt. Save or cancel in the browser.

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

$ Save the editor buffer
# Edit and verify
status=reviewed
evidence=recorded
rollback=ready

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

$ wc -l lab/runbook.txt
4 lab/runbook.txt

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

$ stat lab/runbook.txt
Path: /home/learner/lab/runbook.txt
Type: file
Mode: -rw-r--r--
Owner: learner
Group: learners
Size: 67 bytes

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 “Edit and verify”, which interpretation is safe?

Apply it elsewhere

Before adapting the wc workflow from “Edit and verify” to another server, what should you do?

Keep the momentum.

Complete the lab, then explain and apply the pattern.

Next: Nano runbookTry 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. 01Editing config notesCopy a system config into your lab, edit it safely, and compare the result.Practice
  2. 02Nano runbookCreate a small operational runbook in simulated nano.Practice
  3. 03Nano SSH config copyCopy SSH config to the lab and inspect it after opening nano.Practice