1. Download the required installation files
sudo apt-get install soft name installation and save the installation file
Or sudo apt-get source soft name just download the installation file
2. Move the installation files
By the apt-get downloaded file is saved in / var / cache / apt / archives / down, move a file location changes infrequently.
3. Create apt source
sudo dpkg-scanpackages /filepath/ /dev/null | gzip > /filepath/Packages.gz
(Where filepath is your own file storage location)
4. Modify sources.list
sudo gedit /etc/apt/sources.list
Comment out all configuration, add a line
(Note: deb // File / var / Debs / : // and / filepath / file spaces between)
5. Update apt source
sudo apt-get update
note:
- All of the above must use an absolute path filepath
- Apt source that is created after the completion of Step 3, the apt sources can be used on different computers, but only ubuntu system, only need to modify and update the apt sources to sources.list.