ubuntu commands
Seach the cached list of packages the contain a command or description$ apt-cache search nloadSearch the list of installed packages
$ dpkg-query -S mountList all the files contained in the initscripts package
$ dpkg -L initscriptsRefresh the list of cached packages
$ sudo apt-get update
- APT: Use APT to download and install packages form online repositories.
- dpkg: Use dpkg to work with .deb files
- aptitude: Use aptitude at the command line for working with online repositories
To report on the total number of packages available
$ apt-cache statsOutput:
Total package names: 60926 (1,219 k)
Total package structures: 102901 (5,762 k)
Normal packages: 71359
Pure virtual packages: 1187
Single virtual packages: 9068
Mixed virtual packages: 1825
Missing: 19462
........
Enabling More Repositories for apt
$ sudo vim /etc/apt/sources.listIn a minimal system install, adding software collections with tasksel
$ sudo tasksel
Managing software with APT
check for updates to the packages$ sudo apt-get updateTo fid packages in any available repository
$ apt-cache search [package-name]Install package
$ sudo apt-get install [package-name]Display information about the software
$ apt-cache show [package-name]Check updates for all installed packages and then prompt to download and install them with this command
$ sudo apt-get upgradeRun this command anytime to delete partially downloaded packages, or packages no longer installed
$ sudo apt-get autocleanRemove all cached packages from /var/cache/apt/archives to free up disk space using this command
$ sudo apt-get cleanThis command removes the named package and all its confiuration fies
$ sudo apt-get --purge remove [package-name]This command does a sanity check for broken packages. This tries to fix any
$ sudo apt-get -f installThis command lists GPG keys that APT knows about
$ sudo apt-key listCheck for dependencies the packages
$ sudo apt-cache depends [package-name]Removing packages
$ sudo apt-get remove [package-name]Clean up packages
$ find /var/cache/apt/ -name \*.debDownloading packages
$ sudo apt-get clean
$ sudo apt-get download [package-name]
Managing software with dpkg
This command lists all installed packages$ dpkg -lThis command lists all the files that have been installed from a package
$ dpkg -L [package-name]Install a package
$ sudo dpkg -i [package-name]Remove a package
$ sudo dpkg -r [package-name]Remove package and configuration file
$ sudo dpkg -P [package-name]Verifying install packages with debsums
$ debsums -a Check all files, include config files left out by default
$ debsums –e Check config files for packages only
$ debsums –c List only changed files to stdout
$ debsums –l List files that don't have md5sum info
$ debsums –s List only errors; otherwise be silent
$ debsums package List the packages you want debsums to analyze
Copyright by: www.linuxoperatingsystem.info http://goo.gl/kMscJ4
0 comments:
Post a Comment