set up a static ip address for the Hardy Heron server

Asked by charbar

How can I SAVE changes to the ip settings?

I have tried Vim to edit the ip configuration file like this:
vi /etc/network/interfaces.
I can move around the screen and replace the dhcp with static, then add the necessary static ip addresses, etc.
but when it is time to save, I get a red warning at the bottom of the screen telling me to "add !" to over write the no edit settings.
I can't get pasT that screen.

I am a newbie and am just coming to grips with the Vim software,
I am comfortable with the text screens of the server, I am a DOS dinosaur! It just means learning more code specific to Ubuntu.

My setup at present is a dhcp gateway, firewall and modem all in one. I can easily set the no dhcp on that, after I set up the server.

The help files for Hardy heron are very good ,but a bit light on the using Vim to change the settings. So are the Vim help files.

Charlie

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu ubuntu-docs Edit question
Assignee:
No assignee Edit question
Solved by:
zvacet
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

I suggest nano over vi if you are new to cli text editting

sudo nano /etc/network/interfaces

add the lines to configure your device (Guide here may help http://www.cyberciti.biz/faq/setting-up-an-network-interfaces-file/)

Then press CTRL+X
press Y
press ENTER

You have now saved the file, to implement the file, run:

sudo /etc/init.d/networking restart

Done

Revision history for this message
Best zvacet (ivicakolic) said :
#2
Revision history for this message
charbar (charbar) said :
#3

Thankyou to actionparsnip and zvacet you both pointed me to similar web sites showing the exact setup but not how to save the file after editing. actionparsnip gave me the edge by suggesting the nano program. I shall use the info to try again this evening.

Revision history for this message
charbar (charbar) said :
#4

Thanks zvacet, that solved my question.

Revision history for this message
charbar (charbar) said :
#5

Many thanks actionparsnip! :-)
That nano program is much easier to use than vi by a long way!

The *CTRL X and Y and enter* were the key steps to success.
I did have to contend with access denied and E32 error messages until a
restart to clear the buffer logs.
I did have to edit a vi version once more to release it then nano
cleared up the whole thing.

I now have the 192,168.10.40 static address working ... at last

You are a legend!

Kindest regards
Charlie

actionparsnip wrote:
> Your question #82389 on ubuntu-docs in ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/ubuntu-docs/+question/82389
>
> Status: Open => Answered
>
> actionparsnip proposed the following answer:
> I suggest nano over vi if you are new to cli text editting
>
> sudo nano /etc/network/interfaces
>
> add the lines to configure your device (Guide here may help
> http://www.cyberciti.biz/faq/setting-up-an-network-interfaces-file/)
>
> Then press CTRL+X
> press Y
> press ENTER
>
> You have now saved the file, to implement the file, run:
>
> sudo /etc/init.d/networking restart
>
> Done
>
>

Revision history for this message
charbar (charbar) said :
#6

Thanks zvacet,
You are a legend! :-)

The editing programs were my problems - how to save and exit, and how to
over ride the E32 error - access denied.

Kind regards
Charlie

zvacet wrote:
> Your question #82389 on ubuntu-docs in ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/ubuntu-docs/+question/82389
>
> zvacet proposed the following answer:
> You can read http://www.howtoforge.com/perfect-server-ubuntu8.04-lts-p3
>
>