Anda di halaman 1dari 5

Type Distribution Name

Go

Select Distribution

Go

Home Page DW Weekly, Comments Package Management Packages

Search Major Distributions Submit Distribution Upcoming Releases

About DistroWatch FAQ Advertise Related Links

Advertisement Get the brand-new release of Mandriva Linux 2011 on live DVD ($5.95) or live USB drive (from $14.95)

Package Management Cheatsheet


A package management reference card for Linux distributions and FreeBSD

Introduction Package management is probably the most distinctive feature of any Linux distribution. While the current trend among most of the major projects is to offer some sort of a clickable interface where users can select a package and install it with a mouse click (e.g. Debian's Synaptic or Mandriva's Drakrpm), these types of programs are generally just graphical front-ends to the low-level utilities that manage the tasks associated with installing packages on a Linux system. And even though many desktop Linux users feel much more comfortable installing packages through these intuitive graphical tools, there is no denying that command-line package management offers two excellent features not available in any graphical package management utility: power and speed. One problem that many distro-hoppers and operating system enthusiasts encounter is having to master (or relearn) a set of package management commands each time they switch from one distribution group to another. Additionally, the package management tools tend to evolve, with new features and even new commands added to every new version. This is why we created this package management cheatsheet - an easy reference card covering most frequently used package management tasks in Linux distributions and FreeBSD. As always, we welcome corrections, updates and suggestions - if you spot any error or wish to have another package management utility added to this page, feel free to contact us (email address at the bottom of this page). Package Management Cheatsheet A d v e r t i se m e n t Search Search

Advertisement Main distributions The first table lists package management tasks in the four most popular distribution groups - Debian (including Ubuntu, Linux Mint, KNOPPIX, aptosid and other Debian derivatives), openSUSE, Fedora (including Red Hat Enterprise Linux, CentOS, Scientific Linux and other Fedora-based distributions), and Mandriva Linux and Mageia. Task Managing software Install new software from package repository Install new software from package file Update existing software Remove unwanted software Updating the system Update package list Update system Searching for packages Search by package name apt-cache search pk g zypper search pk g yum list pk g urpmq pk g apt-get update aptitude update apt-get upgrade aptitude safeupgrade zypper refresh zypper update yum check-update yum update urpmi.update -a urpmi --auto-select apt-get install pk g dpkg -i pk g apt-get install pk g zypper install pk g zypper install pk g zypper update -t package pk g yum install pk g yum localinstall pk g yum update pk g yum erase pk g urpmi pk g urpmi pk g urpmi pk g urpme pk g apt (deb) Debian, Ubuntu z ypp (rpm) openSUSE yum (rpm) urpmi (rpm) Fedora, CentOS Mandriva, Mageia

apt-get remove pk g zypper remove pk g

Search by pattern Search by file name List installed packages Configuring access to software repositories List repositories Add repository Remove repository

apt-cache search pattern apt-file search path dpkg -l

zypper search -t pattern pattern zypper wp file zypper search -is

yum search pattern urpmq --fuzzy pk g yum provides file rpm -qa urpmf file rpm -qa

Helios Downloads FAST

cat /etc/apt/sources.list (edit /etc/apt/sources.list)

zypper repos zypper addrepo path name

yum repolist (add repo to /etc/yum.repos.d/)

urpmq --list-media urpmi.addmedia name path

Free optimized mirrors for maximum download speed - Helios & plugins
www.powe re dbypulse .com

(edit zypper removerepo (remove repo from urpmi.removemedia /etc/apt/sources.list) name /etc/yum.repos.d/) media Slackware and Slackware Based Distributions

Brainstorming Software

Get a free 30-day Trial of MM2012 the leading Brainstorming Tool!


www.Mindje t.com

The table below lists package management utilities found in Slackware Linux and other Slackware-based distributions. As stated by Patrick Volkerding on several occasions, Slackware is unlikely to ever have any advanced (i.e. dependency-resolving) package management tool, so all installation, upgrade and removal tasks continue to be performed with pk gtools, a set of very simple scripts that haven't changed much in years. Nevertheless, slack pk g, an advanced package management tool which for years had been relegated to the unsupported "extra" repository, was finally made part of Slackware Linux 12.2. It's worth noting that some popular Slackware derivatives, such as VectorLinux, have standardised on slapt-get, another third-party utility imitating the behaviour of Debian's APT, while Zenwalk Linux has introduced its own package management tool called netpkg. Task Managing software Install new software from package repository Install new software from package file Update existing software Remove unwanted software Updating the system Update package list Update system Searching for packages Search by package name Search by pattern Search by file name List installed packages Configuring access to software repositories List repositories Add repository Remove repository ---cat /etc/slackpkg/mirrors (edit /etc/slackpkg/mirrors) (edit /etc/slackpkg/mirrors) cat /etc/slaptget/slapt-getrc (edit /etc/slaptget/slapt-getrc) (edit /etc/slaptget/slapt-getrc) netpkg mirror (edit /etc/netpkg.conf) (edit /etc/netpkg.conf) ---ls /var/log/packages/ slackpkg search pk g slackpkg search pattern -slapt-get --search pk g slapt-get --search pattern -netpkg pk g repo netpkg list | grep pattern netpkg file repo netpk list I --slackpkg update slapt-get --update (automatic) netpkg upgrade slackpkg upgrade-all slapt-get --upgrade -installpkg pk g upgradepkg pk g removepkg pk g slackpkg install pk g slackpkg install pk g slackpkg upgrade pk g slackpkg remove pk g slapt-get --install pk g slapt-get --install pk g slapt-get --install pk g netpkg pk g netpkg pk g netpkg pk g pkgtools Slackware slackpkg Slackware slapt- get Vector netpkg Zenwalk

LinuxLIVE for Linux PCs

Suspend-Resume, Sharing, Mobility and Re-Connect to Remote X Sessions


www.starne t.com

Free Trial - Bulk Email

Email marketing to fit your needs. Start a Free 30-Day Trial Today.
www.iC ontact.com

Mail Forwarding Service

slapt-get --remove netpkg remove pk g pk g

Get your Mail and Packages anywhere with your own USA street address!
www.USA2m e .com

Latest Books

ls /var/log/packages/ slapt-get --installed

Guide to Operating Systems

Free Linux Guides Linux LPIC 101 Free 15-Minute Guide

Independent Linux Distributions In the next group we have a few (mostly) independent distributions that have been gaining popularity in recent years. Sabayon Linux, although derived from Gentoo, has introduced its own command-line package management utility called equo. Arch Linux's Pacman has been around for a long time and it's often considered one of the fastest package management utilities around. Conary, developed by rPath and popularised by Foresight Linux, is a completely new approach to package management, created by well-known ex-Red Hat engineers with many years of package management experience. In contrast, PiSi by Pardus Linux is a relatively new utility, but the distribution itself has been growing fast in the last couple of years. equo b pacman h conary h i h pisi d

Task Managing software Install new software from package repository Install new software from package file Update existing software Remove unwanted software Updating the system Update package list Update system Searching for packages Search by package name Search by pattern Search by file name List installed packages Configuring access to software repositories List repositories Add repository Remove repository

Sabayon

Arch

rPath, Foresight

Pardus

equo install pk g equo install pk g equo install pk g equo remove pk g equo update equo world equo match pk g equo search pattern equo belongs file equo list

pacman -S pk g pacman -U pk g pacman -S pk g pacman -R pk g pacman -Sy pacman -Su pacman -Ss pk g

conary update pk g conary update pk g conary update pk g conary erase pk g

pisi install pk g pisi install pk g pisi install pk g pisi remove pk g pisi update-repo

conary updateall conary query pk g

pisi upgrade pisi search pk g pisi search pk g Linux Professional Institute Certification 101

pacman -Ss pattern conary query pk g pacman -Qo file pacman -Q

Linux Media

conary query --path pisi search-file path path conary query pisi list-installed 4000+ versions Linux & BSD Ubuntu 11.04 $1.75 $4.95 $4.95 $4.95 $31.95 $4.95 $1.75 $1.75 $21.95 $21.95

equo repoinfo

cat /etc/pacman.conf (edit /etc/pacman.conf) (edit /etc/pacman.conf)

pisi list-repo pisi add-repo name path pisi remove-repo name

CentOS 6.0 DVD Linux Mint 11 DVD Fedora 15 DVD Debian 6.0.2.1 DVD set openSUSE 11.4 DVD PCLinuxOS 2011.6 Mageia 1 DVD USB Flash Drives Ubuntu 11.04 4GB Linux Mint 11 4GB

Distribution Agnostic Package Management Besides standard package management utilities that most distributions use as part of their systems, there are also some distro-agnostic ones that have been deployed with various levels of success in certain distributions. Smart, originally developed by Conectiva, hasn't been in the news lately, but some users seem to prefer it over Mandriva's urpmi or openSUSE's zypper (it also supports Debian and Slackware-based systems). More recently it is Fedora's PackageKit that has been gaining momentum as a way to manage packages across distributions and architectures. Now included in many other distributions, PackageKit's pk gcon command-line utility is effectively a unified front-end to the native package management tools of Fedora, Ubuntu, openSUSE, Mandriva and other distributions. Task Managing software Install new software from package repository Install new software from package file Update existing software Remove unwanted software Updating the system Update package list Update system Searching for packages Search by package name Search by pattern Search by file name List installed packages Configuring access to software repositories List repositories Add repository Remove repository smart channel --show smart channel --add name path smart channel --remove name pkcon repo-list smart search pk g smart search pattern smart query file smart query --installed pkcon search name pk g pkcon search details pattern pkcon what-provides file -smart update smart upgrade pkcon refresh pkcon upgrade smart install pk g smart install pk g smart install pk g smart remove pk g pkcon install pk g pkcon install-file pk g pkcon update pk g pkcon remove pk g smart Mandriva, openSUSE pkgcon Fedora, Ubuntu, openSUSE, Mandriva

Free worldwide shipping on DVD orders 10% discount for returning customers Click here to visit LinuxCD.org now

Linux Media

Ubuntu 11.04 Linux Mint 11 Fedora 15 Mandriva 2011 Debian 6.0.2.1 openSUSE 11.4 Knoppix 6.7.1 USB Flash Drives Ubuntu 11.04 4GB Knoppix 6.7.1 4GB Fedora 15 4GB

$2.35 $2.35 $5.95 $5.95 $26.95 $2.35 $2.35 $14.95 $14.95 $14.95

Free Shipping on orders over $20 Professional Quality Click here to visit OSDisc.com now

Advertisement S B d Di ib i

Source Based Distributions Next, a table for source-based distributions. Gentoo's Portage is well-documented and widely used, but other distributions that are designed to be built from scratch don't often feature in the Linux media, so their package management systems are not particularly well-known. Sorcerer, which existed even before Gentoo Linux was conceived, uses Bash scripts to "cast spells" or download, install and compile packages. Sorcerer was later forked into Lunar Linux and Source Mage GNU/Linux, both of which are included in the table below. Unfortunately, Sorcerer doesn't offer much in terms of online documentation so it has been omitted for now. Task Managing software Install new software from package repository Install new software from package file Update existing software Remove unwanted software Updating the system Update package list Update system Searching for packages Search by package name Search by pattern Search by file name List installed packages Configuring access to software repositories List repositories Add repository Remove repository layman -L layman -a repo layman -d repo FreeBSD Finally, a table for FreeBSD, a popular operating system offering both binary and source package management. Task Managing software Install new software from package repository Install new software from package file Update existing software Remove unwanted software Updating the system Update package list pkg_add -r pack age pkg_add path_to_pack age pkg_add path_to_pack age pkg_delete pk g freebsd-update fetch install cd port_dir && make && make install -portupgrade -R pk g pkg_delete pk g portsnap fecth install csup -L 2 -h cvsup.FreeBSD.org path_to_supfile portsnap update portupgrade -a portmanager -u portmaster -a cd /usr/ports && make search pk g cd /usr/ports && make search pattern pkg_info pkg_info Latest Books Create full-featured, objectoriented web applications with Ruby on Rails Free video training tutorials packages FreeBSD ports FreeBSD Free Linux Guides Ruby on Rails 3 Essential Training ---scribe index scribe add repo scribe remove repo emerge --search pk g emerge --search pattern equery belongs pk g qlist -I lvu installed lvu search pk g lvu search pattern gaze search -name pk g gaze search pattern gaze from file gaze installed emerge --sync emerge -NuDa world lin moonbase lunar update scribe update sorcery upgrade emerge pk g emerge -aC pk g lin pk g lrm pk g cast pk g dispel pk g emerge pk g lin pk g cast pk g portage Gentoo lunar Lunar sorcery Source Mage

Update system Searching for packages Search by package name Search by pattern Search by file name List installed packages Configuring access to software repositories List repositories Add repository Remove repository ----

----

Copyright 2011 DistroWatch.com. Verbatim copying and distribution of this entire article is permitted in any medium, provided this copyright notice is preserved.

The Official Ubuntu Book (6th Edition)

Copyright (C) 2001 - 2011 DistroWatch.com. All rights reserved. All trademarks are the property of their respective owners. Privacy policy. DistroWatch.com is hosted at Green Bay and mirrored at Karlsruhe and Wien. Contact, corrections and suggestions: Ladislav Bodnar -DistroWatch.com is hosted by NetSonic.net (since November 2004). If you need a reliable Debian/Fedora/FreeBSD/Red Hat web hosting solution with excellent support, we highly recommend NetSonic.net.

Anda mungkin juga menyukai