O'Reilly logo

The Linux Command Line by William E. Shotts Jr.

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Starting and Stopping vi

To start vi, we simply enter the following:

[me@linuxbox ˜]$ vi

A screen like this should appear:

˜
˜
˜                         VIM - Vi Improved
˜
˜                          version 7.1.138
˜                      by Bram Moolenaar et al.
˜             Vim is open source and freely distributable
˜
˜                      Sponsor Vim development!
˜          type  :help sponsor<Enter>     for information
˜
˜          type  :q<Enter>               to exit
˜           type  :help<Enter>  or  <F1>  for on-line help
˜          type  :help version7<Enter>    for version info
˜
˜                   Running in Vi compatible mode
˜          type  :set nocp<Enter>         for Vim defaults
˜           type  :help cp-default<Enter> for info on this
˜
˜
˜

Just as we did with nano earlier, the first thing to learn is how to exit. To exit, we enter the following command (note that the colon character is part of the command):

:q

The shell prompt should return. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required