“UbuntuHelp:AptitudeSurvivalGuide”的版本间的差异
来自Ubuntu中文
小 |
小 |
||
第1行: | 第1行: | ||
{{From|https://help.ubuntu.com/community/AptitudeSurvivalGuide}} | {{From|https://help.ubuntu.com/community/AptitudeSurvivalGuide}} | ||
{{Languages|UbuntuHelp:AptitudeSurvivalGuide}} | {{Languages|UbuntuHelp:AptitudeSurvivalGuide}} | ||
− | |||
− | |||
=== Introduction === | === Introduction === | ||
− | |||
Aptitude can give you fine grained package management, and will give you an easily traversed map of the ubuntu packages available to you. This page is meant to be a quick reference to aptitude's interactive mode, and should be enough for you to get started. Aptitude's manuals are linked under Further Information. | Aptitude can give you fine grained package management, and will give you an easily traversed map of the ubuntu packages available to you. This page is meant to be a quick reference to aptitude's interactive mode, and should be enough for you to get started. Aptitude's manuals are linked under Further Information. | ||
− | |||
=== Navigating the Ubuntu package pool === | === Navigating the Ubuntu package pool === | ||
The startup view for aptitude displays a list of the top level groups. | The startup view for aptitude displays a list of the top level groups. | ||
− | |||
==== Key commands available when a group is selected ==== | ==== Key commands available when a group is selected ==== | ||
'''[''' - Expand the currently selected group, and all its subgroups | '''[''' - Expand the currently selected group, and all its subgroups | ||
− | |||
''']''' - Collapse the currently selected group, and all its subgroups | ''']''' - Collapse the currently selected group, and all its subgroups | ||
− | |||
'''Enter''' - Expand or collapse the currently selected group. | '''Enter''' - Expand or collapse the currently selected group. | ||
− | |||
==== Key commands available when a package is selected ==== | ==== Key commands available when a package is selected ==== | ||
'''d''' - view the package dependencies (packages that this package uses) | '''d''' - view the package dependencies (packages that this package uses) | ||
− | |||
'''r''' - view the reverse dependencies (packages that use this package) | '''r''' - view the reverse dependencies (packages that use this package) | ||
− | |||
'''Shift-c''' - download and view the changelog | '''Shift-c''' - download and view the changelog | ||
− | |||
'''Enter''' - view information about the selected package | '''Enter''' - view information about the selected package | ||
− | |||
==== Key commands available everywhere ==== | ==== Key commands available everywhere ==== | ||
'''u''' - update the package lists | '''u''' - update the package lists | ||
− | |||
'''j''' - move down one line | '''j''' - move down one line | ||
− | |||
'''k''' - move up one line | '''k''' - move up one line | ||
− | |||
'''q''' - retreat to the previous view (and exit aptitude if at the top view) | '''q''' - retreat to the previous view (and exit aptitude if at the top view) | ||
− | |||
The navigation keys ('''Page''''''Up, Home, Page''''''Down,''' etc.) work pretty much as expected. | The navigation keys ('''Page''''''Up, Home, Page''''''Down,''' etc.) work pretty much as expected. | ||
− | + | '''You can navigate through the dependencies of the packages available to you by selecting a package that interests you and following its dependencies or reverse dependencies. Repeat as desired.''' | |
− | '''You can navigate through the dependencies of the packages available to you by selecting a package that interests you | + | |
− | + | ||
=== Package Management === | === Package Management === | ||
Aptitude provides straightforward package managment, and artistic use of the available actions (combined with apt-pinning, see PinningHowto) will help you manage unusual repositories, such as backports. | Aptitude provides straightforward package managment, and artistic use of the available actions (combined with apt-pinning, see PinningHowto) will help you manage unusual repositories, such as backports. | ||
− | |||
==== Most common actions on a package ==== | ==== Most common actions on a package ==== | ||
'''+''' (plus) mark package for installation | '''+''' (plus) mark package for installation | ||
− | |||
'''-''' (minus) mark package for removal | '''-''' (minus) mark package for removal | ||
− | |||
'''_''' (underscore) mark package for purging | '''_''' (underscore) mark package for purging | ||
− | |||
'''=''' (equals sign) mark package as held | '''=''' (equals sign) mark package as held | ||
− | |||
==== Committing your actions ==== | ==== Committing your actions ==== | ||
Press '''g''' once to view the marked actions | Press '''g''' once to view the marked actions | ||
− | |||
Press '''g''' a second time to act | Press '''g''' a second time to act | ||
− | |||
=== Searching for packages === | === Searching for packages === | ||
'''/''' - (forward slash) search forward for search term or partial package name | '''/''' - (forward slash) search forward for search term or partial package name | ||
− | |||
'''\''' - (back slash) search backwards for search term or partial package name | '''\''' - (back slash) search backwards for search term or partial package name | ||
− | |||
'''l''' - (lower case L) limit the view to packages matching the search expression. | '''l''' - (lower case L) limit the view to packages matching the search expression. | ||
− | |||
==== Useful search terms ==== | ==== Useful search terms ==== | ||
'''~''' is 'tilde' | '''~''' is 'tilde' | ||
− | |||
'''~b''' - matches broken packages | '''~b''' - matches broken packages | ||
− | |||
'''~c''' - matches partially uninstalled packages ('configured, but not installed') | '''~c''' - matches partially uninstalled packages ('configured, but not installed') | ||
− | |||
'''~ahold''' - matches held packages | '''~ahold''' - matches held packages | ||
− | |||
=== Aptitude from the command line === | === Aptitude from the command line === | ||
You can also run aptitude from the command line | You can also run aptitude from the command line | ||
− | |||
==== aptitude update ==== | ==== aptitude update ==== | ||
<pre><nowiki> | <pre><nowiki> | ||
# aptitude update | # aptitude update | ||
</nowiki></pre> | </nowiki></pre> | ||
− | |||
==== aptitude upgrade ==== | ==== aptitude upgrade ==== | ||
<pre><nowiki> | <pre><nowiki> | ||
# aptitude upgrade | # aptitude upgrade | ||
</nowiki></pre> | </nowiki></pre> | ||
− | |||
==== aptitude search ==== | ==== aptitude search ==== | ||
Search for packages with "gnuplot" in the name | Search for packages with "gnuplot" in the name | ||
第94行: | 第59行: | ||
# aptitude search \!~i~sgnome | # aptitude search \!~i~sgnome | ||
</nowiki></pre> | </nowiki></pre> | ||
− | |||
==== How to free disk space ==== | ==== How to free disk space ==== | ||
<pre><nowiki> | <pre><nowiki> | ||
# aptitude clean --purge-unused | # aptitude clean --purge-unused | ||
</nowiki></pre> | </nowiki></pre> | ||
− | |||
=== Further information === | === Further information === | ||
− | |||
'''"man aptitude"''' at a command prompt. | '''"man aptitude"''' at a command prompt. | ||
− | |||
[file:///usr/share/doc/aptitude/README] | [file:///usr/share/doc/aptitude/README] | ||
− | |||
[file:///usr/share/doc/aptitude/html/en/index.html] | [file:///usr/share/doc/aptitude/html/en/index.html] | ||
− | |||
==== Tips ==== | ==== Tips ==== | ||
If more than one version is available for a particular package (look at the bottom of the package's information view), apt-cache policy <package> seems to be the best way to see which comes from which repository. | If more than one version is available for a particular package (look at the bottom of the package's information view), apt-cache policy <package> seems to be the best way to see which comes from which repository. | ||
[[category:UbuntuHelp]] | [[category:UbuntuHelp]] |
2007年11月30日 (五) 16:07的版本
点击翻译: |
English |
请不要直接编辑翻译本页,本页将定期与来源同步。 |
目录
Introduction
Aptitude can give you fine grained package management, and will give you an easily traversed map of the ubuntu packages available to you. This page is meant to be a quick reference to aptitude's interactive mode, and should be enough for you to get started. Aptitude's manuals are linked under Further Information.
The startup view for aptitude displays a list of the top level groups.
Key commands available when a group is selected
[ - Expand the currently selected group, and all its subgroups ] - Collapse the currently selected group, and all its subgroups Enter - Expand or collapse the currently selected group.
Key commands available when a package is selected
d - view the package dependencies (packages that this package uses) r - view the reverse dependencies (packages that use this package) Shift-c - download and view the changelog Enter - view information about the selected package
Key commands available everywhere
u - update the package lists j - move down one line k - move up one line q - retreat to the previous view (and exit aptitude if at the top view) The navigation keys (Page'Up, Home, Page'Down, etc.) work pretty much as expected. You can navigate through the dependencies of the packages available to you by selecting a package that interests you and following its dependencies or reverse dependencies. Repeat as desired.
Package Management
Aptitude provides straightforward package managment, and artistic use of the available actions (combined with apt-pinning, see PinningHowto) will help you manage unusual repositories, such as backports.
Most common actions on a package
+ (plus) mark package for installation - (minus) mark package for removal _ (underscore) mark package for purging = (equals sign) mark package as held
Committing your actions
Press g once to view the marked actions Press g a second time to act
Searching for packages
/ - (forward slash) search forward for search term or partial package name \ - (back slash) search backwards for search term or partial package name l - (lower case L) limit the view to packages matching the search expression.
Useful search terms
~ is 'tilde' ~b - matches broken packages ~c - matches partially uninstalled packages ('configured, but not installed') ~ahold - matches held packages
Aptitude from the command line
You can also run aptitude from the command line
aptitude update
# aptitude update
aptitude upgrade
# aptitude upgrade
aptitude search
Search for packages with "gnuplot" in the name
# aptitude search gnuplot
Search for packages from the section "gnome" that are not installed
# aptitude search \!~i~sgnome
How to free disk space
# aptitude clean --purge-unused
Further information
"man aptitude" at a command prompt. [file:///usr/share/doc/aptitude/README] [file:///usr/share/doc/aptitude/html/en/index.html]
Tips
If more than one version is available for a particular package (look at the bottom of the package's information view), apt-cache policy <package> seems to be the best way to see which comes from which repository.