AcademyTerminal Tactics: Survival in the ShellPhase 8: Terminal Scribing (Text)

Lesson 9: The Surgeon's Knife (Vim)

Every DevOps engineer must know how to edit files on a server. There is no "Notepad" on a remote server—you have to use Vim.

The Two Faces of Vim

Vim is special because it has Modes:

  1. Normal Mode: Where you navigate. You start here. (Press Esc to return).
  2. Insert Mode: Where you actually type. (Press i to enter).

How to Save & Exit

  1. Press Esc.
  2. Type :wq (Write and Quit) and press Enter.
  3. To quit without saving, type :q!.
booting...

Mission Objective

We have a file called config.txt with the line STATUS=INACTIVE. Use Vim to change it to STATUS=ACTIVE.

  1. Type vi config.txt.
  2. Move to the word INACTIVE.
  3. Press i to insert. Delete INACTIVE and type ACTIVE.
  4. Press Esc, then type :wq to save.

Mission Control

Change the configuration value

Expected Command

vi config.txt