Basic vi commands

There are several frequently-used vi commands.

Table 1. Frequently-used vi commands
Command Action
h Move cursor to the right (in case arrow keys have no effect)
j Move cursor down (in case arrow keys have no effect)
k Move cursor up (in case arrow keys have no effect)
l Move cursor to the left (in case arrow keys have no effect)
CTRL-f Page down (forward)
CTRL-b Page up (backward)
nG Go to line number n. If n is omitted, go to the last line in file.
/pattern Search forward for pattern. After searching, type n to repeat the search.
?pattern Search backward for pattern. After searching, type n to repeat the search.
n Repeat the previous search
:q Quit vi and return to the iprconfig utility