How to Use the vi Text Editor in Linux

In Linux, a common way to edit text files is to use a utility called vi. I haven’t used it a lot, but from what people tell me, it takes awhile to get used to (you do everything with keystrokes rather than a mouse), but once you figure it out it is very powerful.

To edit a text file with vi, you simply type a command such as the following at the command line:

vi /home/Steve/Files/TextFile.txt

Once you’re in vi, you have to use certain combinations of keystrokes to accomplish what you want. For example, if you want to exit vi, you type a colon followed by q (for quit).

There are many resources on the Web about how to use this tool. Here are a couple:

Leave a Reply