15.01.2024 Views

CompTIA A+ Certification All-in-One Exam Guide

  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Figure 15-18 vi with text

To save your new file and quit vi, type ZZ (note the uppercase) and press

ENTER. To edit an existing file, just type vi followed by the name of the file

you wish to edit. If you wanted to edit the fred file, for example, you would

type

mike@server:~$ vi fred

The biggest trick to vi is making sure you know which mode you are in

and how to swap between the two modes. Press ESC to get into command

mode and press I to get into insert mode. Be ready to make lots of mistakes

the first few times you use vi!

The vi command set is archaic, but it is powerful if you take the time to

learn it. Here is a list of a few command mode keys that you’ll find helpful:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!