Currently I directly type the following command to bind static ip for eth0 via normal user.
$sudo ifconfig eth0:1 192.168.20.66
How do I run this command when boot Ubuntu without typing password?
on 01/18/2013 – Made popular on 01/18/2013
I have an Ubuntu Server 10.04.1 that I have given a static IP address. Every six hours or so I will lose connectivity to it and when I type ifconfig to look at the network information, it has been given an address via dhcp. If I run the /etc/init.d/networking restart command the IP address goes back to my static address and things are fine for another 6 hours or so.
dura wrote:ifconfig eth0 downYou could make a script and put it in /bin so eth0 is turned off at boot. Make it executable:#!/bin/sh
ifconfig eth0 downThanks I've put this command in my script and it works. But it is weird because with or without eth0 the wat usage is the same. Maybe there is no consumption and powertop is showing some false data. Will leave it this way anyway.
I have two PC's and a series of Juniper EX-2200 switches connected to form a network.None of the devices are connected to any external network.If I do an ifconfig on the first PC (monitor) I see that that PC only has an ethernet address.It does not have an IP address.I want to use an IP address to use applications such as scp.
Welcome to Arch. Two things in addition to Graysky's link (TL;DR version of the link: It is probably not called eth0:)1. ifconfig is depreciated. The preferred command now is a sub command of ip. The command is: ip link2. ifconfig only displays the interfaces that have an address. To see all the interfaces, use ifconfig -a or, of course, i