Results 1 to 2 of 2

Thread: Editing Unix files with vi, or how to get nano

  1. #1
    Former Employee Newbie
    Join Date
    Nov 2005

    Default Editing Unix files with vi, or how to get nano

    Your system comes with a standard Unix editor called vi, which has, according to some, an idiosyncratic way of being used.

    If you wanted to edit the mysql configuration file, for example, at your Unix prompt, enter as root user:
    vi /etc/my.cnf

    Use your arrow keys, or 'j' and 'k', to get to the part of the file you want to edit. To insert text, hit the letter 'i'. Type in what you want. Then enter [esc] to get out of insert mode. Entering ':wq' will save the file and exit. Entering ':q!' will exit without saving.

    There are many more commands available, but those basics will get you into entering text and back out again.

    If you really don't like vi, there is a simple text editor called nano that is available for download as an rpm that you can install. Our rpm repository is located at There are rpms for several different versions of Redhat Linux variants there.

  2. #2
    Junior Member Newbie
    Join Date
    Nov 2005


    Here is a good VI cheat sheet:


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts