From the course: Practical Linux for Network Engineers: Part 1

Unlock this course with a free trial

Join today to access over 22,500 courses taught by industry experts.

vi shortcuts and why learn vi?

vi shortcuts and why learn vi?

- So let's look at some commands that may be useful. I'll use a VI to open etc hosts. Go to share my host file. So I can use down key, up key. G takes me to the bottom of the file. Lowercase gg takes me to the top of the document. So uppercase g takes me to the bottom or end of the document. Lowercase gg takes me to the top of the document. Forward slash, search. So let's search for Ubuntu. Notice it takes me to the text that I've searched for. That's very similar to what we have in Cisco IOS. If I type sh run, press forward slash. Notice I can search for face. Forward slash again. I can search for face. Forward slash again. Search for vty. So that's very similar to what we have in VI. Press n to repeat the search. So let's use forward slash and search for ff. Press n, press n again; n, n, n. Notice it's finding ff, ff based on our search. Search for ip6; n, n, n, n, n, n. Makes it very easy to find text. I means insert mode, so now I can add characters here. And let's make a mistake.…

Contents