Утилита apt linux документация

Утилита apt linux документация

NAME

apt - command-line interface

SYNOPSIS

apt [-h] [-o=config_string] [-c=config_file] [-t=target_release] [-a=architecture] pkg [pkg_version_number | /target_release>]. | remove pkg. | upgrade | full-upgrade | edit-sources | | >

DESCRIPTION

apt (Advanced Package Tool) is the command-line tool for handling packages. It provides a commandline interface for the package management of the system. See also apt-get(8) and apt-cache(8) for more low-level command options. list list is used to display a list of packages. It supports shell pattern for matching package names and the following options: --installed, --upgradable, --all-versions are supported. search search searches for the given term(s) and display matching packages. show show shows the package information for the given package(s). install install is followed by one or more package names desired for installation or upgrading. A specific version of a package can be selected for installation by following the package name with an equals and the version of the package to select. This will cause that version to be located and selected for install. Alternatively a specific distribution can be selected by following the package name with a slash and the version of the distribution or the Archive name (stable, testing, unstable). remove remove is identical to install except that packages are removed instead of installed. Note that removing a package leaves its configuration files on the system. If a plus sign is appended to the package name (with no intervening space), the identified package will be installed instead of removed. edit-sources edit-sources lets you edit your sources.list file and provides basic sanity checks. update update is used to resynchronize the package index files from their sources. upgrade upgrade is used to install the newest versions of all packages currently installed on the system from the sources enumerated in /etc/apt/sources.list. New package will be installed, but existing package will never removed. full-upgrade full-upgrade performs the function of upgrade but may also remove installed packages if that is required in order to resolve a package conflict.

OPTIONS

All command line options may be set using the configuration file, the descriptions indicate the configuration option to set. For boolean options you can override the config file by using something like -f-,--no-f, -f=no or several other variations. -h, --help Show a short usage summary. -v, --version Show the program version. -c, --config-file Configuration File; Specify a configuration file to use. The program will read the default configuration file and then this configuration file. If configuration settings need to be set before the default configuration files are parsed specify a file with the APT_CONFIG environment variable. See apt.conf(5) for syntax information. -o, --option Set a Configuration Option; This will set an arbitrary configuration option. The syntax is -o Foo::Bar=bar. -o and --option can be used multiple times to set different options.

SCRIPT USAGE

The apt(8) commandline is designed as a end-user tool and it may change the output between versions. While it tries to not break backward compatibility there is no guarantee for it either. All features of apt(8) are available in apt-cache(8) and apt-get(8) via APT options. Please prefer using these commands in your scripts.

DIFFERENCES TO APT-GET(8)

The apt command is meant to be pleasant for end users and does not need to be backward compatible like apt-get(8). Therefore some options are different: • The option DPkgPM::Progress-Fancy is enabled. • The option APT::Color is enabled. • A new list command is available similar to dpkg --list. • The option upgrade has --with-new-pkgs enabled by default.

SEE ALSO

apt-get(8), apt-cache(8), sources.list(5), apt.conf(5), apt-config(8), The APT User's guide in /usr/share/doc/apt-doc/, apt_preferences(5), the APT Howto.

DIAGNOSTICS

apt returns zero on normal operation, decimal 100 on error.

BUGS

AUTHOR

Источник

Читайте также:  Создать пользователя admin linux

Утилита apt linux документация

NAME

apt - command-line interface

SYNOPSIS

apt [-h] [-o=config_string] [-c=config_file] [-t=target_release] [-a=architecture] pkg [pkg_version_number | /target_release>]. | remove pkg. | upgrade | full-upgrade | edit-sources | | >

DESCRIPTION

apt provides a high-level commandline interface for the package management system. It is intended as an end user interface and enables some options better suited for interactive usage by default compared to more specialized APT tools like apt-get(8) and apt-cache(8). Much like apt itself, its manpage is intended as an end user interface and as such only mentions the most used commands and options partly to not duplicate information in multiple places and partly to avoid overwhelming readers with a cornucopia of options and details. update (apt-get(8)) update is used to download package information from all configured sources. Other commands operate on this data to e.g. perform package upgrades or search in and display details about all packages available for installation. upgrade (apt-get(8)) upgrade is used to install available upgrades of all packages currently installed on the system from the sources configured via sources.list(5). New packages will be installed if required to statisfy dependencies, but existing packages will never be removed. If an upgrade for a package requires the remove of an installed package the upgrade for this package isn't performed. full-upgrade (apt-get(8)) full-upgrade performs the function of upgrade but will remove currently installed packages if this is needed to upgrade the system as a whole. install, remove, purge (apt-get(8)) Performs the requested action on one or more packages specified via regex(7), glob(7) or exact match. The requested action can be overridden for specific packages by append a plus (+) to the package name to install this package or a minus (-) to remove it. A specific version of a package can be selected for installation by following the package name with an equals (=) and the version of the package to select. Alternatively the version from a specific release can be selected by following the package name with a forward slash (/) and codename (jessie, stretch, sid . ) or suite name (stable, testing, unstable). This will also select versions from this release for dependencies of this package if needed to satisfy the request. Removing a package removes all packaged data, but leaves usually small (modified) user configuration files behind, in case the remove was an accident. Just issuing an installation request for the accidentally removed package will restore its function as before in that case. On the other hand you can get rid of these leftovers by calling purge even on already removed packages. Note that this does not affect any data or configuration stored in your home directory. autoremove (apt-get(8)) autoremove is used to remove packages that were automatically installed to satisfy dependencies for other packages and are now no longer needed as dependencies changed or the package(s) needing them were removed in the meantime. You should check that the list does not include applications you have grown to like even though they were once installed just as a dependency of another package. You can mark such a package as manually installed by using apt-mark(8). Packages which you have installed explicitly via install are also never proposed for automatic removal. search (apt-cache(8)) search can be used to search for the given regex(7) term(s) in the list of available packages and display matches. This can e.g. be useful if you are looking for packages having a specific feature. If you are looking for a package including a specific file try apt-file(1). show (apt-cache(8)) Show information about the given package(s) including its dependencies, installation and download size, sources the package is available from, the description of the packages content and much more. It can e.g. be helpful to look at this information before allowing apt(8) to remove a package or while searching for new packages to install. list (work-in-progress) list is somewhat similar to dpkg-query --list in that it can display a list of packages satisfying certain criteria. It supports glob(7) patterns for matching package names as well as options to list installed (--installed), upgradeable (--upgradeable) or all available (--all-versions) versions. edit-sources (work-in-progress) edit-sources lets you edit your sources.list(5) files in your preferred texteditor while also providing basic sanity checks.

SCRIPT USAGE AND DIFFERENCES FROM OTHER APT TOOLS

The apt(8) commandline is designed as an end-user tool and it may change behavior between versions. While it tries not to break backward compatibility this is not guaranteed either if a change seems beneficial for interactive use. All features of apt(8) are available in dedicated APT tools like apt-get(8) and apt- cache(8) as well. apt(8) just changes the default value of some options (see apt.conf(5) and specifically the Binary scope). So you should prefer using these commands (potentially with some additional options enabled) in your scripts as they keep backward compatibility as much as possible.

SEE ALSO

apt-get(8), apt-cache(8), sources.list(5), apt.conf(5), apt-config(8), The APT User's guide in /usr/share/doc/apt-doc/, apt_preferences(5), the APT Howto.

DIAGNOSTICS

apt returns zero on normal operation, decimal 100 on error.

BUGS

AUTHOR

Источник

Читайте также:  Процессы и демоны линукс

Пакетный менеджер APT

Advanced Packaging Tool – набор утилит для управления программными пакетами в операционных системах основанных на Debian. APT предоставляет дружественную надстройку над DPKG и позволяет:

APT является одной из базовых программ и включена в состав Ubuntu.

Настройки

Все файлы настроек APT хранятся в директории /etc/apt.

apt.conf

/etc/apt/apt.conf – основной файл настроек, используемый всеми инструментами из состава APT. Описание всех возможных настроек и опций можно прочитать в документации к нему:

apt.conf.d

Директория содержащая в себе файлы конфигурации, аналогичные по синтаксису apt.conf. При помощи этой директории можно быстро и удобно манипулировать настройками APT добавляя или удаляя подготовленные файлы с настройками.

auth.conf

Файл, содержащий ключи, для авторизации в репозиториях. Например, туда добавляются логины и пароли от репозиториев к купленным в Центре приложений программам.

sources.list

sources.list.d

Директория с файлами репозиторий, по назначению аналогичных sources.list. Каждый репозиторий описывается в отдельном файле.

Использование

В APT входит несколько утилит, выполняющих отдельные задачи.

Начиная с версии Ubuntu 16.04 доступна новая утилита apt , которая содержит наиболее часто используемые команды из apt-get и apt-cache . Утилита apt предназначена для пользователей, в то время как apt-get можно рассматривать как как инструмент более низкого уровня.

apt-get

apt-get это утилита управления пакетами. apt-get требует прав суперпользователя для своей работы.

install foo — Установить пакет foo. Скачивание, установка и настройка происходят автоматически. Если для настройки пакета foo нужны дополнительные сведения, будет показан запрос к пользователю.

dist-upgrade — Обновление пакетов, требующих разрешения зависимостей (установка дополнительных или удаление конфликтующих пакетов).

purge foo — Удаление пакета foo и очистка системы от его конфигурационных файлов. Файлы настроек в домашних каталогах пользователей удалены не будут.

autoremove — Удаление пакета, который более не нужен в системе. Используется для очистки системы от ненужных пакетов. Факт, что пакет более не нужен, определяется следующим образом: если пакет был установлен не сам по себе, а как зависимость для другого пакета, который впоследствии был удалён, значит этот пакет тоже уже не нужен в системе.

Читайте также:  Linux check run process

Починка базы пакетов

apt-get также используется для устранения сбоев в базе пакетов вызванных нарушенными зависимостями. Разрешение зависимостей производится командой:

apt-cache

apt-cache – утилита, позволяющая выполнять запросы к кешу APT.

apt-key

apt-key служит для добавления ключей от репозиториев в систему. Ключи защищают репозитории от возможности подделки пакета. Подробнее смотрите в статье Репозитории.

Источник

Оцените статью
Adblock
detector