How-To Geek

Switch Ubuntu Server to use Internet Repositories Instead of cdrom

If you install Ubuntu from a cd-rom, when you try to use apt-get to install new software it will prompt you for the cdrom every time. Kinda frustrating!

There’s an easy way to fix this problem. Run the following command to open the sources.list file. You can use a different editor if you feel like.

sudo vi /etc/apt/sources.list

The first thing you’ll want to do is comment out this line, by placing a # symbol before it.

deb cdrom:[Ubuntu-Server 6.10 _Ed…..

You can also use this opportunity to uncomment the universe repositories.

Now that you’ve updated the repository list, you will have to run this command to update the local list of available software:

sudo apt-get update

Now you can apt-get install from the internet.

Lowell Heddings, better known online as the How-To Geek, spends all his free time bringing you fresh geekery on a daily basis. You can follow him on if you'd like.

  • Published 12/13/06

Comments (4)

  1. Keith

    It’s a great site you have here. I just installed Ubuntu and over the past two days have been really struggling with it.
    I’m not sure what you mean by this:
    “The first thing you’ll want to do is comment out this line, by placing a # symbol before it.”
    You mean, before typing out sudo vi /etc apt/sources. list ?

    apologies if I sound dim, but it’s no fun being a newbie!

  2. The Geek

    If you are using Ubuntu Desktop, you might want to use the article “Update Ubuntu Repository list using Software Sources GUI Tool” linked in the related how-to list above.

    You can just uncheck the cdrom from there, mostly likely.

    Otherwise, you can open the file /etc/apt/sources.list in whatever editor you choose, and put the # right before the cdrom line, on the same line.

  3. Keith

    Thanks very much. I’ll try that.
    Another question, which I can’t find the answer to: I have a lot of photographs (jpegs) burned on to CDs. But when I put them in the drive nothing at all happens and I can’t find them by browsing the files.
    Any idea how I can make them display? Thanks.

  4. ftpmget

    thx, man, helped me to overcome the annoying prompt for dvd insertion.
    thx again.

More Articles You Might Like

Enter Your Email Here to Get Access for Free:

Go check your email!