FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 09-02-2012, 08:30 AM
Levi Nie
 
Default How can run a instruction when Ubuntu12.04 starting up??

I want to run "sudo ifconfig eth0 192.168.64.3" *automaticly when my VM starting up.

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 09-02-2012, 08:41 AM
Karl Auer
 
Default How can run a instruction when Ubuntu12.04 starting up??

On Sun, 2012-09-02 at 16:30 +0800, Levi Nie wrote:
> I want to run "sudo ifconfig eth0 192.168.64.3" automaticly when my VM
> starting up.

Static configuration of network interfaces is generally achieved by
editing /etc/network/interfaces ("man interfaces). A likely stanza to do
what you want might be:

auto eth0
iface eth0 inet static
address 192.168.64.3
netmask 255.255.255.0
gateway 192.168.64.1
broadcast 192.168.64.255

Depending on circumstances you may be able to leave out the broadcast
and/or gateway lines.

For IPv6 it looks like this:

auto eth0
iface eth0 inet6 static
address 2001:db8:0:100::3
netmask 64

There is no broadcast address in IPv6, and the gateway will generally be
delivered via router advertisements.

Regards, K.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer@biplane.com.au)
http://www.biplane.com.au/kauer
http://www.biplane.com.au/blog

GPG fingerprint: AE1D 4868 6420 AD9A A698 5251 1699 7B78 4EEE 6017
Old fingerprint: DA41 51B1 1481 16E1 F7E2 B2E9 3007 14ED 5736 F687


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 09:54 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org