LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   saving changes to apache2/conf/httpd.conf file (http://www.linuxquestions.org/questions/linux-newbie-8/saving-changes-to-apache2-conf-httpd-conf-file-133271/)

Zaius 01-10-2004 12:25 AM

saving changes to apache2/conf/httpd.conf file
 
i've just installed apache and i want to make a few changes to the httpd.conf file... who knew... but once opened with 'vi' i don't know how to save the changes i've made.. how do i do this?

trickykid 01-10-2004 12:29 AM

Several ways in fact.

In command mode (ESC) you can do:

:wq!

Stands for write and then quit

Or you can simply do a <Shift + ZZ>

Cheers.

Kovacs 01-10-2004 12:31 AM

To save the file press [ESCAPE] then :w [ENTER]
to save and quit :wq [ENTER]
to quit without saving :q! [ENTER]

(the colon is part of the command that you type in)

to go back to insert mode press I, to get back to command mode press escape

Kovacs 01-10-2004 12:32 AM

Beat me to it trickykid :)

alar 01-10-2004 12:32 AM

I would change the wording there trickykid

In command mode you can do:

Hit <esc> to take you out of edit mode then enter

:wq!

Stands for write and then quit

i always forget about the
<Shift + ZZ>

;)

Zaius 01-10-2004 12:44 AM

so.. <esc> gets me to the command prompt and then i type :wq! to save and quite

or within the VI i can just press <shift + z z> and it saves it and i continue on my marry way editng..

alar 01-10-2004 12:45 AM

yup
did it work?


All times are GMT -5. The time now is 07:22 AM.