Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1588406
  • 博文数量: 317
  • 博客积分: 10283
  • 博客等级: 上将
  • 技术积分: 3566
  • 用 户 组: 普通用户
  • 注册时间: 2007-09-04 11:38
个人简介

哥使用Linux

文章分类

全部博文(317)

分类: LINUX

2008-03-24 22:23:46

Software Management Command Line Comparison

From openSUSE

Functions listing for several command line software management utilities


This listing shows functions that are implemented in the major command line software management utilities. They are grouped by management task, e.g. package management or sources management. The analysis describes the function in the first column, lists the corresponding commands of all tools except zypper in the second column and finally the zypper command in the last column.


Important notes:

  1. As most package management systems don't have concepts beyond packages, those concepts were moved to the end of the listing.
  2. Every tool uses a different term for installation sources. We use the term “Installation Source” in our description.
  3. rug commands are available in both found versions. rug* commands were only available in one of the found versions.
  4. Non-SUSE distribution specific commands have been omitted (e.g. apt-cache madison)
  5. Many commands, especially the apt commands, feature a wide set of options to be applied. Thus some commands in one tool have actually a counterpart in another tool when a certain option is used.
  6. rug commands specific to daemon-control have been omitted.
  7. The listing is rather compressed, thus for more details to a function and what action is exactly performed by a tool, please refer to the tool's documentation. Some commands differ in rather subtle ways.


Note on apt tools:

Apt provides a set of tools which split the functionality that is provided by other systems in one tool. While apt-get performs actions that change the system's state and therefore requires authorization, apt-cache only works on the information in a read-only manner. This means no authorization is required to get information about packages or the management system.


For some functionality falling back to dpkg and grep is required.


The following sections are:


Package management

Commands that are performing actual actions on the packages and change the state of the system. Exceptions to this rule are package information commands that are too closely related to a group of package management commands and are in fact the only package information command in this group of commands.


Package information management

Commands that provide information about packages, display a certain group of packages or show the state of the package management system.


Installation sources management

Commands that help with the management of installation sources


SUSE specific commands

These are commands only found in SUSE tools as they are highly specific to the SUSE environment. Thus only rug and zypper commands are listed here.


Security

Security related commands, being key management, user management etc.


Other

Other commands which do not fit one of the above categories


Package management
Install package
Install a package(s) by name
rug install
apt-get install

smart install

yum install
zypper install
Remove package
Remove a package(s) by name
erase
apt-get remove

smart remove

yum remove|erase
zypper remove
Search package (Fulltext)
Search for package(s) by searching the expression in name, description, short description.

What exact fields are being searched by default varies in each tool. Mostly options bring tools on par.

rug search
apt-cache search

smart search

yum search
zypper search
Update Packages
Install packages which have an older version already installed
rug update
apt-get upgrade

smart upgrade

yum update
zypper update
Upgrade Packages
Another form of the update command, which can perform more complex updates -- like distribution upgrades. When the usual update command will omit package updates, which include changes in dependencies, this command can perform those updates.
apt-get dist-upgrade
yum upgrade
Reinstall given Package
Will reinstall the given package without dependency hassle.
apt-get --reinstall \ install
smart reinstall
zypper install --force
Install local package
Installs local package file, e.g. app.rpm and uses the installation sources to resolve dependencies
yum localinstall
Update with local package
Updates package(s) with local packages and uses the installation sources to resolve dependencies
yum localupdate
Fix broken dependencies
Use some magic to fix broken dependencies in a system
apt-get --fix-broken
smart fix

rug* solvedeps
Download the given package
Only downloads the given package(s) without unpacking or installing them
apt-get --download-only
smart download
Remove unneeded dependencies
Remove dependencies that are no longer needed, because e.g. the package which needed the dependencies was removed.
apt-get autoremove
Fetch source package
Downloads the corresponding source package(s) to the given package name(s)
apt-get source zypper source-install
Satisfy build-dependencies
Install/Remove packages to satisfy buid-dependencies. Uses information in the source package.
apt-get build-dep
Add package lock
Add a package lock rule to keep its current state from being changed
rug* lock-add
smart flag --set lock

apt (through pinning and priorities -- complex!)
Delete package lock
Delete a package lock rule
rug* lock-delete
smart flag --remove lock

apt (through pinning and priorities -- complex!)
List all package lock rules
Show a listing of all lock rules
rug* lock-list
smart flag --show lock

/etc/apt/preferences
Add a checkpoint
Add a checkpoint to the package system for later rollback
rug* checkpoint-add
Remove a checkpoint
Remove a checkpoint from the system
rug* checkpoint-remove
List all checkpoints
Provides a list of all system checkpoints
rug* checkpoints
Rollback packages
Rolls entire packages back to a certain date or checkpoint.
rug* rollback


Package information management
Get a dump of the whole system information
Prints, Saves or similar the current state of the package management system. Preferred output is text or XML. One version of rug dumps information as a sqlite database.

(Note: Why either-or here? No tool offers the option to choose the output format.)

rug dump
apt-cache stats

smart stats
Show full info for package(s)
Show all or most information about a package.

The tools' verbosity for the default command vary. But with options, the tools are on par with each other.

rug info
apt-cache showpkg

apt-cache show

smart info 

yum list or info 
zypper info
Search package (Fulltext)
Search for package(s) by searching the expression in name, description, short description.

What exact fields are being searched by default varies in each tool. Mostly options bring tools on par.

rug search
apt-cache search

smart search

yum search
zypper search
Show available updates
Lists packages which have an update available.

Note: Some provide special commands to limit the output to certain installation sources, others use options.

rug list-updates
apt-get upgrade -> n

yum list updates

yum check-update

rug summary
zypper list-updates
zypper patch-check (just for patches)
Show all available packages
Display a list of all packages in all installation sources that are handled by the packages management.

Some tools provide options or additional commands to limit the output to a specific installation source.

rug packages
apt-cache dumpavail

apt-cache dump (Cache only)

apt-cache pkgnames
IN PROGRESS
Show package(s) which provide X
Displays packages which provide the given exp. aka reverse provides.

Mainly a shortcut to search a specific field. Other tools might offer this functionality through the search command.

rug what-provides
yum whatprovides

yum provides

apt (dpkg | grep)
IN PROGRESS
Show package(s) which require X
Display packages which require X to be installed, aka show reverse dependencies.

rug's what-requires can operate on more than just package names.

rug what-requires
apt-cache rdepends

yum resolvedep
IN PROGRESS
Show conflicts of package X
Display packages which conflict with given expression (often package).

Search can be used as well to mimic this function. rug's what-conflicts function operates on more than just package names

rug info-conflicts
smart check 

rug what-conflicts
IN PROGRESS
List package's requirements
List all packages which are required for the given package, aka show dependencies.
rug info-requirements
apt-cache depends

yum deplist
IN PROGRESS
List package's provides
List what the current package provides
rug info-provides
yum provides
IN PROGRESS
List files within package
List the files that the package holds.

Again, this functionality can be mimicked by other more complex commands.

rug* file-list
yum provides
IN PROGRESS
Get package which contains file
Search all packages to find the one which holds the specified file.

auto-apt is using this functionality.

rug* package-file
rug what-provides

apt-file

yum provides

yum whatprovides
IN PROGRESS
List all obsoletes of package
Display all packages that the specified packages obsoletes.
rug info-obsoletes
yum list obsoletes

apt-cache | grep
IN PROGRESS
Verify system dependencies
Verify dependencies of the complete system. Used if installation process was forcefully killed.
rug verify
apt-get check ?

apt-cache unmet

smart check 

yum deplist

rug* dangling-requires
List installed packages
Generates a list of installed packages
apt-cache --installed
yum list installed
List installed local packages
List packages that are installed but are not available in any installation source (anymore).
yum list extras
List recently added packages
List packages that were recently added to one of the installation sources, i.e. which are new to it.

Note: Synaptic has this functionality, however apt doesn't seem to be the provider.

yum list recent
Search log history
Show a log of actions taken by the software management.
rug history
Clean the local caches
Clean up all local caches. Options might limit what is actually cleaned.

Autoclean removes only unneeded, obsolete information.

apt-cache clean
smart clean

yum clean

apt-cache autoclean
Add package to package cache
Add a local package to the local package cache mostly for debugging purposes.
apt-cache add
Display source package
Display the source package to the given package name(s)
apt-cache showsrc
Generate dotty output
Generates an output suitable for processing with dotty for the given package(s).
apt-cache dotty
Set priority of given package
Set the priority of the given package to avoid upgrade, force downgrade or to overwrite any default behavior. Can also be used to prefer a package version from a certain installation source.
smart priority --set
/etc/apt/preferences
Remove priority
Remove a previously set priority
smart priority --remove
/etc/apt/preferences
Show all priorities
Show a list of set priorities.
smart priority --show
apt-cache policy

/etc/apt/preferences
Ignore priority problems
Ignores problems that priorities may trigger.
smart priority --force
Installation sources management
Add an installation source
Add an installation source to the system. Some tools provide additional commands for certain sources, others allow all types of source URI for the add command.

Again others, like apt and yum force editing a sources list.

apt-cdrom is a special command, which offers special options design for CDs/DVDs as source.

rug service-add
smart channel --add

rug mount /local/dir

apt-cdrom add 
zypper service-add
Refresh installation source(s)
Refresh the information about the specified installation source(s) or all installation sources.
rug refresh
apt-get update

smart update

yum check-update
zypper refresh
List all installation sources
Prints a list of all installation sources including important information like URI, alias etc.
rug service-list
smart channel --show
zypper service-list
Remove an installation source
Removes an installation source from the list forever
rug service-delete
smart channel --remove

rug* unmount /local/dir
zypper service-delete
Remove all installation sources
Delete all known installation sources
smart channel --remove-all
Modify an installation source
Modify the information of a channel by specifying key-value pairs
smart channel --set
Edit installation source information
Modify channel information with the editor specified by $editor.

Kind of default behavior of apt and yum.

smart channel --edit
Disable an installation source
Disables a source for any actions without removing it from the list of installation sources
smart channel --disable zypper modifyrepo --disable
Enable installation source
Enables a previously disabled installation source
smart channel --enable zypper modifyrepo --enable
Rename an installation source
Changes the alias for the specified installation source
smart channel --set zypper service-rename
Show mirrors
Show current mirrors for the given master URL/installation source
rug mirrors
smart mirror --show
Add mirror
Add a mirror to given origin URL
smart mirror --add
Remove mirror
Remove a mirror of given origin URL
smart mirror --remove
Remove all mirrors
Remove all mirrors of given origin URL
smart mirror --remove-all
Synchronize mirrors from file
Take mirrors from a given file
smart mirror --sync=FILE
Edit mirrors
Edit mirror information with your $editor
smart mirror --edit
Clear mirror history
Clears penality data for given origin/mirror
smart mirror --clear-history
Show current penalities
Show the current penalities* for given origin/mirror

* Misspelled IMHO, but anyways that's how smart implements it.

smart mirror --show-penalities
Register an installation source
Register a premium installation source
rug* register  ?
List types of installation sources
List all available types of installation sources
rug* service-types  ?
SUSE specific commands
Check for patches
Check if new packages are available
zypper patch-check
Install patches
Install the specified patches
rug install -t patch
rug patch-install
zypper install -t patch
Show patches
Display patches (in a given source)
rug patches
rug patch-list
zypper patches
Show information of patch
Show detailed information for the given patch
rug patch-info zypper patch-info
Search for patch
Search for patches matching a pattern
rug* patch-search IN PROGRESS
Show patterns
Show the patterns in a given source
rug* patterns IN PROGRESS
Show pattern information
Show detailed information about a pattern
rug* pattern-info IN PROGRESS
Install/Remove patterns
Actions on patterns are engaged with the same command as the package installation/removal
rug* install -t pattern
rug* remove -t pattern
zypper install -t pattern
zypper remove -t pattern
Show products
Show all products in a given source
rug* products IN PROGRESS
Show product information
Show detailed information about a product
rug* product-info IN PROGRESS
Install/Remove product
Actions on product are engaged with the same command as the package installation/removal
rug* install -t product
rug* remove -t product
zypper install -t product
zypper remove -t product
Security-related commands and Other commands
Add a key for a source
Add a key to the keyring
rug* key-add
apt-key add 
Remove a key
Remove a key from the keyring for a source
rig* key-delete
apt-key del
Display keyring
Show all known key on the keyring
rug* key-list
apt-key list
Update the keyring
Check for updated keys and update the local keyring
apt-key update
Add a user
Add a new user
rug user-add
Delete user(s)
Remove users
rug user-delete
Edit users
Edit an existing user
rug user-edit
List user
List all users
rug user-list
Start a shell
Start a shell to enter multiple commands in one session
yum shell zypper shell
 
阅读(1971) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~