Results 1 to 5 of 5

Thread: Change download servers from command line?

  1. #1
    Join Date
    Feb 2008
    Location
    Arizona
    Beans
    65
    Distro
    Ubuntu

    Change download servers from command line?

    How do I change the whole sources.list to a different update server? I want to change from the US server to one in utah that is blazing fast. How do I do this from the CLI? I am running Server 9.04 and want to upgrade, without using do-release-upgrade. Thanks.

  2. #2
    Join Date
    Jun 2007
    Beans
    1,745

    Re: Change download servers from command line?

    Use a text based editor to edit the sources file.
    Code:
    sudo nano /etc/apt/sources.list
    Ctrl+o to save
    Ctrl+X to exit.
    Licat volaré si superturgum Aquila volat

  3. #3
    Join Date
    Feb 2008
    Location
    Arizona
    Beans
    65
    Distro
    Ubuntu

    Re: Change download servers from command line?

    I know this, i want to have the file scanned and then replace all the existing URL's for the US server to the Utah server. Thanks though.

  4. #4
    Join Date
    Jun 2007
    Beans
    1,745

    Re: Change download servers from command line?

    Well you can comment out the current server and remove the comment from the other server, but it's a bit of a risk really.
    Code:
    sudo sed -i 's/^[^#]/#/' /etc/apt/sources.list
    echo "NEW URL" | sudo tee -a /etc/apt/sources.list
    Much safer to do it by hand.
    Licat volaré si superturgum Aquila volat

  5. #5
    Join Date
    Feb 2008
    Location
    Arizona
    Beans
    65
    Distro
    Ubuntu

    Re: Change download servers from command line?

    I ended up modifying your sed command, worked great. Thanks.

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
  •