Score:0

Ubuntu 10.04, how to restart networking service to apply static ip configuration

cn flag

So, my eth0 interface in ubuntu 10.04(DVWA Machine) is configured with dhcp by default, but it is not taking an IP from the dhcp(in VirtualBox), that's why I want to assign a static IP. I have already made the change in /etc/network/interfaces from dhcp to static, like this:

auto eth0
iface eth0 inet static
address 192.168.0.100
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1

And saved the changes, but each time I reboot the ubuntu machine I lose the config I made. Hence, I want to see if just by restarting the network/interface service I can get these changes to work.

I have tried to execute this command:
/etc/init.d/networking restart, but it fails, I got the error:
ifdown: couldnt read interfaces file "etc/network/interfaces"

Does anyone know how to restart the network service in UBUNTU 10.04? or how to solve my problem? I want to configure a static IP instead of DHCP.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.