Debian APT

1.Conf file :/etc/apt/sources.list

2.update apt: apt-get update. Do not forget to runapt-get update after modifying the/etc/apt/sources.list file. You must do this to let APT obtainthe package lists from the sources you specified.

3.how to use apt locally

a.# mkdir /root/debs

b.still in the root directory do : # dpkg-scanpackages debs file  | gzip > debs/Packaes.gz

c.modify the sources.list, add : deb file:/root debs/

d.add the sources file:

I:dpkg-scansources debs | gzip > debs/Sources.gz

II: modify the sources.list file, add : deb-src file:/root debs/

4.deciding which mirrors is the best to include in the sources.list file: netselect netselect-apt

5.adding the cd-rom to the sources.list (write in the sources.list file)
   # apt-cdrom add
     option:
     -h           - program help
     -d           - directory - CD-ROM mount point
     -r           - Rename a recognized CD-ROM
     -m           - No mounting
     -f           - Fast mode, don't check package files
     -a           - Thorough scan mode
for example: apt-cdrom -d /path/to/the/cdrom add

6. install software: apt-get install softwareName
   option:
     -h  This help text.
     -d  Download only - do NOT install or unpack archives
     -f  Attempt to continue if the integrity check fails
     -s  No-act. Perform ordering simulation
     -y  Assume Yes to all queries and do not prompt
     -u  Show a list of upgraded packages as well

        Note: You can specify packages to be removed on the same command line, as well. Just put a '-' immediately after the name of the package to be removed.

7. remove software: apt-get remove softwareName

8. update all the software: apt-get upgrade

9. upate the system : apt-get dist-upgrade

10. remove the unused packages: apt-get clean, apt-get autoclean

11. show versions: apt-show-versions -u

12. search packages: apt-cache search packagesName

13. show packages information: apt-cache show packagesName

14. use the dpkg to search packages: dpkg -S packageName

15. use the dpkg to show packages info: dpkg -l | grep "packageName"

16. download the source file: apt-get source packageName. This will download three files: a .orig.tar.gz, a .dsc and a .diff.gz.

17. build the source files: apt-get -b source packageName

你可能感兴趣的:(Debian APT)