Invoking vi

To start vi, simply execute it. You will be editing a temporary file. To directly edit one or more files, give the names of the files on the command line:

$ vi file1.txt file2.txt

You are presented with a main window showing the contents of file1.txt, or if the specified files don’t already exist, a blank screen with tilde (~) characters running the length of the left column (they indicate areas of the screen containing no text, not even blank lines).

Get LPI Linux Certification in a Nutshell, 3rd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.