Modify /etc/apt/sources.list with the
apt-cdromcommand. This is the only way to add CD archives to sources.list. There must be a disk in the drive, but it does not need to be mounted. Then type:
# apt-cdrom add
Using CD-ROM mount point /cdrom/ Unmounting CD-ROM Please insert a Disc in the drive and press enter Mounting CD-ROM Identifying.. [0eabc03d10414e59dfa1622326e20da7-2] Scanning Disc for index files.. Found 1 package indexes and 0 source indexes. This Disc is called: 'Libranet GNU/Linux 2.8.1 CD2' Reading Package Indexes... Done Wrote 1271 records. Writing new source list Source List entries for this Disc are: deb cdrom:[Libranet GNU/Linux 2.8.1 CD2]/ archive/ Repeat this process for the rest of the CDs in your set.
-dswitch to add a CD in a different CD drive:
# apt-cdrom -d /cdrom1 add
To identify a disk, use:
$ apt-cdrom ident
Using CD-ROM mount point /cdrom/ Mounting CD-ROM Identifying.. [0eabc03d10414e59dfa1622326e20da7-2] Stored Label: 'Libranet GNU/Linux 2.8.1 CD2'
apt-getselects the newest versions of packages to install from the available sources. As the Linux world advances swiftly, your online sources will always be the newest. To make sure a program gets installed from a CD, comment out the other lines in your sources.list. Remember to run
apt-getupdate every time you change your sources.list.
Learn more about this topic from Linux Cookbook.
Linux information can be found scattered in man pages, texinfo files, and source code comments, but the best source is the experts who have built up a working knowledge of managing Linux systems. The Linux Cookbook's tested techniques distill years of hard-won experience into practical cut-and-paste solutions to everyday Linux dilemmas. Use just one recipe from this collection of real-world solutions, and the hours of tedious trial-and-error saved will more than pay for the cost of the book. It's more than a time-saver; it's a sanity saver.