Find the answer to your Linux question:
Results 1 to 2 of 2
have a development board, everytime i reboot, the ipadress will be gone, n i need to do the ifconfig eth0 192.168.1.1 up to assign to my board. do we have ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2005
    Posts
    1

    How to run a command or program automatically after finished booting in console


    have a development board, everytime i reboot, the ipadress will be gone, n i need to do the ifconfig eth0 192.168.1.1 up to assign to my board. do we have anything way to do it auto run ths ifconfig cmmand after booting? thx

    root:~> ifconfig
    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0

    root:~> ifconfig eth0 192.168.1.1 up

  2. #2
    Just Joined!
    Join Date
    Nov 2005
    Location
    India
    Posts
    13

    re:How to run a command or program automatically after finished booting in console

    hi,

    the ip related info will be there in /etc/sysconfig/network-scripts directory .For an alternate ip to be configured u need to create the file named ifcfg-eth0

    and add the following content to the file then it will have the ip on bootup

    DEVICE=eth0
    BOOTPROTO=static
    BROADCAST=192.168.1.255
    IPADDR=192.168.1.1
    NETMASK=255.255.255.0
    NETWORK=192.168.1.0
    ONBOOT=yes
    TYPE=Ethernet

    regards
    jagadish

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •