LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Need serious help in vi (Red Hat 9, unchanged kernel) (https://www.linuxquestions.org/questions/linux-general-1/need-serious-help-in-vi-red-hat-9-unchanged-kernel-137643/)

Echs Bochs 01-22-2004 08:13 PM

Need serious help in vi (Red Hat 9, unchanged kernel)
 
I'm editing (trying. anyways) modules.conf. I opened in it in vi, and I need to modify eth0's alias. So I deleted the path, and now I was trying to enter its correct path (nvnet). I accidentally deleted the soundcard path however! I need to know how I can enter text and create a new line. All help appreciated.

jtshaw 01-22-2004 08:30 PM

Check this out:
http://www.cs.colostate.edu/helpdocs/vi.html

origen 01-22-2004 08:33 PM

I'm assuming that you are trying do this in vi?

if so...

hit escape like 10 times...
type letter a and you should be able move about freely...

then when you're done, type escape, then colon (:) and the letters wq

:wq

this means write and quit.

hope that helped.

Echs Bochs 01-22-2004 08:37 PM

I was able to edit everything, then when I hit colon another thing came up. I hit w then q, but my comp just beeped. If I hit q enough times the bottom of the console said Recording... can I just close the window?

origen 01-22-2004 08:40 PM

If you just close your window, you'll create a swap file, like a weird backup/recovery file that you don't want...

type

:q!

a few times until you get back to your prompt

this will close your file and not save any changes that were made (and not changed)

then start over

vi /etc/modules.conf

or whatever the file is
then type the letter 'a', this will get you into edit mode

then we you're done, type

:wq

Echs Bochs 01-22-2004 08:45 PM

Thank you very much. Hopefully the next messages posted here will be from my Linux machine! You've made it onto my good users list.

origen 01-22-2004 08:56 PM

no problem... :)

Echs Bochs 01-22-2004 09:01 PM

I shall trump the beast known as Linux some day. THEN we'll see who's laughing, penguin! >_>

Vlad_M 01-23-2004 03:23 PM

Quote:

Originally posted by Echs Bochs
I shall trump the beast known as Linux some day. THEN we'll see who's laughing, penguin! >_>
Until that day, may I suggest that man pages as your first resource.

Code:

man vi
would have told you all you needed to know in this case.


All times are GMT -5. The time now is 10:01 PM.