Results 1 to 5 of 5

Thread: Switching to Dynamic IP from command line

  1. #1
    Join Date
    Sep 2008
    Beans
    2

    [Solved] Switching to Dynamic IP from command line

    I have an ubuntu server set up without a GUI and need to switch it from static to dynamic IP from the command line. I cannot download any packages as it was configured on a different router to the one I am using now. If it is more complicated than a few settings changes in config files I will have to make other arrangements. Anyone have a set of commands that can do this?
    Last edited by wibbleberry; September 11th, 2008 at 08:57 AM. Reason: Update solution status

  2. #2
    Join Date
    Mar 2008
    Beans
    1,755

    Re: Switching to Dynamic IP from command line

    Code:
    jordan@bourne:~$ cat /etc/network/interfaces
    \# This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).
    
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    auto eth1
    iface eth0 inet manual

    Change the word "manual" to "dhcp" under the interface you would like to change in the file /etc/network/interfaces

  3. #3
    Join Date
    Sep 2008
    Beans
    2

    Re: Switching to Dynamic IP from command line

    Brilliant. Had to go brush up on vi. Ta vm.

  4. #4
    Join Date
    Jan 2010
    Location
    TN
    Beans
    25
    Distro
    Ubuntu 14.04 Trusty Tahr

    Talking Re: Switching to Dynamic IP from command line

    Quote Originally Posted by Titan8990 View Post
    Code:
    jordan@bourne:~$ cat /etc/network/interfaces
    \# This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).
    
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    auto eth1
    iface eth0 inet manual
    Change the word "manual" to "dhcp" under the interface you would like to change in the file /etc/network/interfaces

    Thank you for this! I changed mine over to static ip and lost my internet connection, switching back to dynamic helped.

  5. #5
    pricetech is offline Iced Blended Vanilla Crème Ubuntu
    Join Date
    Apr 2008
    Beans
    1,651

    Re: Switching to Dynamic IP from command line

    Quote Originally Posted by wibbleberry View Post
    Brilliant. Had to go brush up on vi. Ta vm.
    nano is simpler.

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
  •