Anda di halaman 1dari 4

Home Page DW Weekly, Comments Package Management Packages

Type Distribution Name

Go

Select Distribution

Go

Search Major Distributions Submit Distribution Upcoming Releases

About DistroWatch FAQ Advertise Related Links

Advertisement Get the brand-new release of PCLinuxOS 2011.6 KDE edition on a live CD ($2.35)

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 is e me n t Search Search

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 Search by pattern Search by file name List installed packages Configuring access to software repositories List repositories apt (deb) Debian, Ubuntu apt-get install pkg dpkg -i pkg apt-get install pkg apt-get remove pkg apt-get update aptitude update apt-get upgrade aptitude safeupgrade zypp (rpm) openSUSE zypper install pkg zypper install pkg zypper update -t package pkg zypper remove pkg zypper refresh zypper update yum (rpm) Fedora, CentOS yum install pkg yum localinstall pkg yum update pkg yum erase pkg yum check-update yum update urpmi (rpm) Mandriva, Mageia urpmi pkg urpmi pkg urpmi pkg urpme pkg urpmi.update -a urpmi --auto-select

Advertisement

Linux Cloud Server


Get Reliable Cloud Servers For Only $9.96/month. Free Setup. Compare!
www.hostway.com /cloud-hosting

Server Backup & DR


Full Server Image Backups Backups Stored Locally & OffSite
www.x x pert.com

Certification Programs
Browse Our Catalog of Certification Programs to Find One Near You.
www.Certificates.DegreeLeap.com

$99 Amish Acres Package


yum list pkg yum search pattern yum provides file rpm -qa urpmq pkg urpmq --fuzzy pkg urpmf file rpm -qa All-inclusive 2 day/1 night Nappanee, Indiana
www.am ishacres.com

apt-cache search pkg zypper search pkg apt-cache search zypper search -t pattern pattern pattern apt-file search path zypper wp file dpkg -l zypper search -is

Top10 eCommerce Solutions


2011 Top eCommerce Solution Ranking Get Vendor Research by Top Analyst
Business-Software.com /eCom m erce

cat zypper repos /etc/apt/sources.list (edit zypper addrepo path

yum repolist (add repo to

urpmq --list-media urpmi.addmedia

converted by Web2PDFConvert.com

Add repository Remove repository

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

Latest Books

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. dependencyresolving) package management tool, so all installation, upgrade and removal tasks continue to be performed with pkgtools, a set of very simple scripts that haven't changed much in years. Nevertheless, slackpkg, 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 pkgtools Slackware -installpkg pkg upgradepkg pkg removepkg pkg ---slackpkg Slackware slackpkg install pkg slapt-get Vector netpkg Zenwalk Linux Interview Questions You'll Most Likely Be Asked netpkg pkg netpkg pkg netpkg pkg netpkg remove pkg (automatic) netpkg upgrade netpkg pkg repo netpkg list | grep pattern netpkg file repo netpk list I Linux Guides/Whitepapers NEW! 50 Uses For Live CDs

slapt-get --install pkg slapt-get --install slackpkg install pkg pkg slapt-get --install slackpkg upgrade pkg pkg slapt-get --remove slackpkg remove pkg pkg slackpkg update slapt-get --update slackpkg upgrade-all slapt-get --upgrade slackpkg search pkg

slapt-get --search pkg slackpkg search slapt-get --search -pattern pattern ---ls /var/log/packages/ ls /var/log/packages/ slapt-get --installed

----

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)

NEW! This FREE 31-page manual lists things you can accomplish with a live CD, from data recovery to virus removal to trying out cool operating systems.

Linux Media

4000+ versions Linux & BSD 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. 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 equo Sabayon equo install pkg equo install pkg equo install pkg equo remove pkg equo update equo world pacman Arch pacman -S pkg pacman -U pkg pacman -S pkg pacman -R pkg pacman -Sy pacman -Su conary rPath, Foresight conary update pkg conary update pkg conary update pkg conary erase pkg pisi Pardus pisi install pkg pisi install pkg pisi install pkg pisi remove pkg pisi update-repo pisi upgrade pisi search pkg pisi search pkg
converted by Web2PDFConvert.com

Ubuntu 11.04 Kubuntu 11.04 Linux Mint 11 DVD Fedora 15 DVD Debian 6.0.1a DVD set openSUSE 11.4 DVD Mageia 1 DVD USB Flash Drives Ubuntu 11.04 4GB Linux Mint 11 4GB Easy Peasy 1.6 4GB

$1.75 $1.75 $4.95 $4.95 $31.95 $4.95 $1.75 $21.95 $21.95 $21.95

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

conary updateall conary query pkg conary query pkg

Linux Media

equo match pkg pacman -Ss pkg equo search pattern pacman -Ss pattern

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

equo belongs file equo list

pacman -Qo file pacman -Q

conary query --path pisi search-file path path conary query pisi list-installed

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

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 pkgcon 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 Mandriva, openSUSE smart install pkg smart install pkg smart install pkg smart remove pkg smart update smart upgrade smart search pkg smart search pattern smart query file smart query --installed pkgcon Fedora, Ubuntu, openSUSE, Mandriva pkcon install pkg pkcon install-file pkg pkcon update pkg pkcon remove pkg pkcon refresh pkcon upgrade pkcon search name pkg pkcon search details pattern pkcon what-provides file --

Ubuntu 11.04 Linux Mint 11 Fedora 15 Debian 6.0.2.1 openSUSE 11.4 Sabayon 6 PCLinuxOS 2011.6 USB Flash Drives Ubuntu 11.04 4GB Linux Mint 11 4GB Fedora 15 4GB

$2.35 $2.35 $5.95 $26.95 $2.35 $5.95 $2.35 $15.95 $15.95 $15.95

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

Linux Identity

Fedora 15 Magazine ($14.99) Fedora stands out from the pack due to its polished interface, excellent community support, cutting-edge software and constant updates.

Advertisement smart channel --show smart channel --add name path smart channel --remove name Source Based Distributions pkcon repo-list

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 portage Gentoo emerge pkg lunar Lunar lin pkg sorcery Source Mage cast pkg

emerge pkg emerge -aC pkg emerge --sync emerge -NuDa world emerge --search pkg emerge --search pattern equery belongs pkg

lin pkg lrm pkg lin moonbase lunar update lvu search pkg lvu search pattern

cast pkg dispel pkg scribe update sorcery upgrade gaze search -name pkg gaze search pattern gaze from file
converted by Web2PDFConvert.com

List installed packages Configuring access to software repositories List repositories Add repository Remove repository

qlist -I

lvu installed

gaze installed Linux Guides/Whitepapers

layman -L layman -a repo layman -d repo FreeBSD

----

scribe index scribe add repo scribe remove repo

NEW! 50 Uses For Live CDs

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 packages FreeBSD pkg_add -r package pkg_add path_to_package pkg_add path_to_package pkg_delete pkg freebsd-update fetch install ports FreeBSD cd port_dir && make && make install -portupgrade -R pkg pkg_delete pkg 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 pkg cd /usr/ports && make search pattern pkg_info pkg_info NEW! This FREE 31-page manual lists things you can accomplish with a live CD, from data recovery to virus removal to trying out cool operating systems.

Latest Books

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

----

----

Linux Bible 2011 Edition: Boot up to Ubuntu, Fedora, KNOPPIX, Debian, openSUSE, and 13 Other Distributions

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

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 Dallas 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.

converted by Web2PDFConvert.com

Anda mungkin juga menyukai