vi is a standard but powerful screen-oriented text editor. You’ll be needing it if you are not using a GUI desktop in your Red Hat Enterprise Linux or CentOS server. This is a quick tutorial on how to use vi to enable you to use it immediately.

Quick Howto

vi1. Type in vi filename and press Enter. If filename exists, vi will open it. If the filename does not exists, vi will create a it.
vi2. vi is now in view/command mode. Type in i to shift to edit/insert mode.
vi3. You can now begin typing the text or making changes to the file.
vi4. When you’re done making your changes, press Esc to go back to view/command mode.
vi5. Type in :wq to save your changes and quit or :q! to cancel your changes and quit.

Visit the forum to ask for help or to give a comment.

***
Posted on 3/15/2008 and last updated on 3/6/2011
Filed under System Administration