Results 1 to 4 of 4

Thread: How can run a instruction automaticly when Ubuntu12.04 starting up??

  1. #1
    Join Date
    Aug 2012
    Beans
    2

    How can run a instruction automaticly when Ubuntu12.04 starting up??

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

  2. #2
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: How can run a instruction automaticly when Ubuntu12.04 starting up??

    Quote Originally Posted by levinie001 View Post
    I want to run "sudo ifconfig eth0 192.168.64.3" automaticly when my VM starting up.
    Add that command without the sudo prefix to your /etc/rc.local file, just above the "exit 0" line.

  3. #3
    Join Date
    Jul 2010
    Location
    Michigan, USA
    Beans
    2,136
    Distro
    Ubuntu 18.04 Bionic Beaver

    Re: How can run a instruction automaticly when Ubuntu12.04 starting up??

    If you are just trying to set a static ip on eth0, why don't you just make an entry in /etc/network/interfaces for the interface?

  4. #4
    Join Date
    Jun 2012
    Beans
    33

    Re: How can run a instruction automaticly when Ubuntu12.04 starting up??

    Add ethernet configuration to /etc/network/interfaces as mentioned above then restart networking.

Bookmarks

Posting Permissions

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