Web Hosting Talk







View Full Version : Quick Unix / Linux question!


ensol
06-06-2007, 07:58 PM
Hey all, I am just beginning learning DHCP in Unix..and forgot a basic command

{
host xxx {
hardware ethernet 00:11:22:33:44:55;
{
: [I know I hit ESC and then : ], but I forget what to put here, is it qw! or wq!), something about quit rewrite or rewrite quit or write quit, not sure

then init.d/dhcpd stop then type init.d/dhcp start.

Any help would be great, thankjs

mwatkins
06-06-2007, 08:47 PM
if you are editing with vi, you move from insert mode to normal (command) mode, write the file and quit, using the following sequence:

ESC
:
w
q
ENTER

seankoons
06-06-2007, 09:01 PM
if you are editing with vi, you move from insert mode to normal (command) mode, write the file and quit, using the following sequence:

ESC
:
w
q
ENTER

Don't forget the bang (:wq!) :D

mwatkins
06-07-2007, 12:07 AM
Don't forget the bang (:wq!) :D

You don't need the bang.

You would use the bang if you wanted to abort an edit without saving, i.e.

ESC:q!

The same is true whether you use vi, or vim (which I use for near everything).