Linux command
apt-cdrom 命令
安全
权限或系统影响较大,执行前请核对目标。
常用示例
Add
sudo apt-cdrom add
Example
sudo apt-cdrom add -m
Identify
sudo apt-cdrom ident
Example
sudo apt-cdrom add -d [/media/cdrom]
说明
apt-cdrom adds CD-ROMs or DVD-ROMs to APT's list of available sources. It scans the disc, identifies packages, and adds appropriate entries to /etc/apt/sources.list. This is useful for offline installations or when using distribution media without internet access.
参数
- add
- Add disc to sources list
- ident
- Report disc identity without adding
- -d _path_
- CD-ROM mount point
- -m, --no-mount
- Don't mount/unmount the disc
- -r, --rename
- Prompt for disc label
- -f, --fast
- Fast copy (assume disc structure)
- -a, --thorough
- Thorough scan for packages
FAQ
What is the apt-cdrom command used for?
apt-cdrom adds CD-ROMs or DVD-ROMs to APT's list of available sources. It scans the disc, identifies packages, and adds appropriate entries to /etc/apt/sources.list. This is useful for offline installations or when using distribution media without internet access.
How do I run a basic apt-cdrom example?
Run `sudo apt-cdrom add` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does add do in apt-cdrom?
Add disc to sources list