Escape from Vim

Linux lab Intermediate 3 tasks 20 points

The captain's file must be fixed, and on this ship the editor is vim. Open ship/captain.txt with vim, make the changes, then save and quit.

Quick reminder: i to type, Esc to stop typing, dd deletes a line, :wq saves and quits.

How it works: the terminal below is a real Linux machine running in your browser. Click it and type. Tasks tick themselves off as you complete them; questions are answered in the box under each task. Press Reset any time for a fresh machine. Your password on this machine (for sudo) is student.

student@vulntech:~ Starting…
Getting your Linux machine ready…
The first start downloads about 20 MB. After that your browser keeps it, and labs start in a moment.

Hints

Not sure which mode you're in? Press Esc: you're always back in normal mode.

Made a mess? u undoes, or :q! quits without saving so you can start again.

Solution explanation

Open the file with vim ship/captain.txt. Move to unknown on line 2 with the arrow keys, delete it with x (or cw), press i and type student, then Esc. Move down to DELETE ME and type dd. Finally type :wq and press Enter.

Show solution
vim ship/captain.txt
HOME LEARN COMMUNITY DASHBOARD