LinuxQuestions.org

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

Zaius 01-09-2004 11:25 PM

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-09-2004 11:29 PM

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-09-2004 11:31 PM

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-09-2004 11:32 PM

Beat me to it trickykid :)

alar 01-09-2004 11:32 PM

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-09-2004 11:44 PM

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-09-2004 11:45 PM

yup
did it work?


All times are GMT -5. The time now is 07:03 PM.