$
Learn Linux handbook
en
XP:0
Quest 96Vim-Virtuoso
+250 XP

Vim Navigation, Deleting & Searching (dd, yy, p, /)

Launch Interactive Terminal for This Quest→No installation required • Runs fully in browser

Concept & Overview

Once you master Normal mode commands, Vim allows lightning-fast text manipulation without touching a mouse:

- dd: Delete (cut) the entire current line into the yank buffer.
- yy: Yank (copy) the current line.
- p: Paste the yank buffer on the line below the cursor.
- /pattern: Search forward through the file for text matching pattern.
- :%s/old/new/g: Global search and replace throughout the entire file without manual edits.

Open server.conf with vim server.conf. Search for the word port by typing /port. Substitute all occurrences of 99999 with 8080 using :%s/99999/8080/g. Delete any unneeded line using dd, and then save and quit with :wq.

Command Syntax Reference

Command / SyntaxDescription
/portSearch for text pattern in Vim
:%s/99999/8080/gSearch and replace throughout file in Vim
ddDelete (cut) current line in Vim
:wqSave and exit Vim

Verification Objectives

These conditions will be automatically verified when you run commands inside the interactive terminal simulator:

  • ○
    Search for pattern using "/port"
  • ○
    Replace port using ":%s/99999/8080/g"
  • ○
    Delete line with "dd"
  • ○
    Save modified file with ":wq"

Ready to complete Quest 96?

Test your skills live in the browser terminal with an emulated Linux filesystem, real-time command evaluation, and instant step-by-step hints.