Mission 64

Nano config backup

Back up a config copy before editing it.

Nano and editing
9 minutes Admin Lesson 64 of 360
cpnanodiff
Lesson 64 of 360 0/360 lessons 0/17 missions Nano and editing · 9 minutes
0%
Continue View profile
Ops lab terminal Training lab
New learnerrank 0XP 0%complete
learner@clairos:/home/learner $ Unix ops lab: type a command, press Enter
Instructions 9 minutes

Click any instruction for the command details, the why, and the common mistake to avoid.

Copy config

Run cp /etc/nginx/sites-available/learn.conf lab/learn.conf.

cp /etc/nginx/sites-available/learn.conf lab/learn.conf
Copy backup

Run cp lab/learn.conf lab/learn.conf.bak.

cp lab/learn.conf lab/learn.conf.bak
Compare backup

Run diff lab/learn.conf lab/learn.conf.bak.

diff lab/learn.conf lab/learn.conf.bak
Lesson support

What to notice while you play.

Objective

Create a backup copy and compare after editing.

Hint

Copy the file twice, then edit one copy.

Why it matters

Diffing against a backup shows exactly what changed.

Common mistakes
  • Backing up after editing.
  • Comparing the wrong pair of files.
Reference

Commands in this lesson.

nano <file>

Open a simulated nano editor.

diff <left> <right>

Compare two lab text files.

cp <src> <dst>

Copy a file.