First of all, this Tips will not actually back up the executable files and corresponding configurations of the software you have installed. It only uses Ubuntu software to install this feature over the network, back up the list of installed software and use this list to perform one-time installation. Although this method has the feeling of being arrogant, it can still play a certain effect sometimes, for example, when installing machines in batches. The following method is used:-back up the package list on the current machine: viewsourceprint? 1 sudod
First of all, this Tips will not actually back up the executable files and corresponding configurations of the software you have installed. It only uses Ubuntu software to install this feature over the network, back up the list of installed software and use this list to perform one-time installation. Although this method has the feeling of being arrogant, it can still play a certain effect sometimes, for example, when installing machines in batches.
The method is as follows:
-List of backup software packages on the current machine:
View sourceprint? 1 sudo dpkg -- get-selections> app-backup-list.txt
-Import and reinstall all software on the reinstalled machine:
View sourceprint? 1 sudo dpkg -- set-selections <app-backup-list.txt
2 sudo apt-get-y update
3 sudo apt-get dselect-upgrade
In addition, if you have installed a large number of software using the PPA source, remember to back up and restore the/etc/apt directory first.
PS: the common usage of the apt-get command is attached.
Sudo apt-cache search package
Sudo apt-cache show package obtains package information, such as description, size, and version.
Sudo apt-get install package installation package
Sudo apt-get install package--reinstall re-installation package
Sudo apt-get-f install fix and install "-f =-fix-missing"
Sudo apt-get remove package Delete package
Sudo apt-get remove package--purge delete a package, including deleting a configuration file.
Sudo apt-get update source
Sudo apt-get upgrade updates installed packages
Sudo apt-get dist-upgrade System
Sudo apt-get dselect-upgrade using dselect
Apt-cache depends package for dependency usage
Apt-cache rdepends package is used to check which packages are dependent on this package.
Sudo apt-get build-dep package installation-related compilation environment
Apt-get source package download the source code of the package
Sudo apt-get clean & sudo apt-get autoclean clear useless packages
Sudo apt-get check whether any corrupted dependency exists