I'm having some problems installing packages off the cd. The ubuntu server is installed in a small local network with a dns but no internet connection. When I try installing a package, i.e. lamp or vsftpd it just tries to resolve the name of the update server. After some tries it gives up instead of checking the CD. I've added the CD using sudo apt-cdrom add. I've also tried using tasksel, which opens aptitude, without any luck.

How do I install packages (lamp, ssh, ftp, dhcp, samba) off the CD without internet connection?

EDIT: Since this was unclear: We're given a server with ubuntu server installed and we're supposed to install lamp, ssh, ftp, dhcp and samba on it. To ensure we aren't cheating (asking the internet for help during the contest) we are limited to using only the cd.


You can try all these methods https://help.ubuntu.com/community/InstallingSoftware#Installing_packages_without_an_Internet_connection

If you cannot use USB sticks either you are left with packages on CD. So please check that those packages you want to install are on CD! As space of the CD is limited I doubt that lamp is available from CD. Maybe you can get a DVD with more packages on it.

  • They're suggesting using another online computer and a usb stick to transfer files. However, I'm not allowed to use an internet connection at all. Their link to the official documentation is broken (404). – Filip Haglund May 2 '12 at 10:07
  • So your are stick to use only the packages on CD? BTW: you must have downloaded the CD from internet too, right? – math May 2 '12 at 10:12
  • I've got the cd, an installation of ubuntu server but no internet connection. – Filip Haglund May 2 '12 at 10:18

Might as well help anyone who might have this problem.

The list of sources for apt to use is located in: /etc/apt/sources.list

The first row is the cd, uncomment it by removing the leading hash. You can use nano to edit it like this:

sudo nano /etc/apt/sources.list

Enter the password if prompted.

Also, comment away all internet sources if they aren't available, i.e. you are on a computer without internet connection. Just add hashes in front of all the other rows.

After that you just save the file by pressing ctrl+o, and you're all good to go.


I solved this like this: In bios my ISO USB STICK was detected as "CD-ROM" i changed this value to


After that i booted from this stick and installed Ubuntu 16 LTS. Everything works

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.