Skip to content
Clairos Learn

Nano and editing · Lesson 2 of 27 · 10 minutes

Editing config notes

Copy a system config into your lab, edit it safely, and compare the result.

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

Change control starts with preserving the original.

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

Creating a folder does not change the current directory.

cp
Copy a file to a new location, leaving the original in place.

Confirm the destination before replacing a file. This lab supports file copies, not every cp option.

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.

grep
Select input lines that match a pattern; -i ignores case, -n adds line numbers, and -v inverts selection.

No matches is exit status 1, which is different from a malformed invocation.

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

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

$ cp /etc/nginx/sites-available/learn.conf lab/learn.conf
(no output; exit 0)

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

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

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

$ Save the editor buffer
server {
  listen 443 ssl;
  server_name learn.clairos.ai;
  root /srv/www;
  # reviewed training copy
}

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

$ grep server_name lab/learn.conf
  server_name learn.clairos.ai;

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 “Editing config notes”, which interpretation is safe?

Apply it elsewhere

Before adapting the nano workflow from “Editing config notes” to another server, what should you do?

Keep the momentum.

Complete the lab, then explain and apply the pattern.

Next: Edit and verifyTry 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 with nanoOpen the simulated nano editor, save a text file, and verify your change.Practice
  2. 02Edit and verifyCreate a runbook, count its lines, and inspect metadata after saving.Practice
  3. 03Nano runbookCreate a small operational runbook in simulated nano.Practice