Results 1 to 4 of 4

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

  1. #1
    Former Employee Newbie
    Join Date
    Nov 2005
    Posts
    56

    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 ftp://66.249.6.114/linux. There are rpms for several different versions of Redhat Linux variants there.

  2. #2
    Junior Member Newbie
    Join Date
    Jul 2005
    Posts
    21

    Default

    The editor pico is very simple too.
    pico /etc/my.cnf

  3. #3
    Junior Member Newbie
    Join Date
    Jan 2006
    Posts
    5

    Red face More vi information...

    vi is great for editing once you learn the commands.

    Here's a related link on them:
    http://www.phaget4.org/seidel/vi.html

    Hope that helps someone.

  4. #4
    Junior Member Newbie
    Join Date
    Dec 2005
    Posts
    13

    Default

    Getting nano This has colored syntax highlighting..

    VIA SSH

    cd /root
    wget http://www.nano-editor.org/dist/v1.2/nano-1.2.5.tar.gz
    tar -xvzf nano-1.2.5.tar.gz
    cd nano-1.2.5
    ./configure
    make
    make install

Bookmarks

Posting Permissions

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