热门标签 | HotTags
当前位置:  开发笔记 > 运维 > 正文

dpkg,apt差别

dpkg,apt差别--Linux发行版技术-Debian信息,下面是详情阅读。
dpkg是用来安装.deb文件,但不会解决模块的依赖关系,且不会关心ubuntu的软件仓库内的软件,可以用于安装本地的deb文件

apt会解决和安装模块的依赖问题,并会咨询软件仓库, 但不会安装本地的deb文件, apt是建立在dpkg之上的软件管理工具

sudo apt-get update Consults /etc/apt/sources.list
and updates the database of available
packages. Be sure to run this command
whenever sources.list is changed.
apt-cache search Case-insensitive search of the package
database for the keyword given. The
package names and descriptions are
returned where that keyword is found.
sudo apt-get install Download and install the given package
name as found in the package database.
Starting with APT version 0.6, this
command will automatically verify
package authenticity for gpg keys it
knows about (http://wiki.debian
.org/SecureApt).

sudo apt-get -d install Download the package only, placing it
in /var/cache/apt/archives.
apt-cache show Display information about the software
from the named package.
sudo apt-get upgrade Check updates for all installed packages
and then prompt to download
and install them.
sudo apt-get dist-upgrade Updates the entire system to a new
release, even if it means removing
packages. Note: This is not the preferred
method for updating a system.
sudo apt-get autoclean Can be run anytime to delete partially
downloaded packages, or packages
no longer installed.
sudo apt-get clean Removes all cached packages from
/var/cache/apt/archives to
free up disk space.
sudo apt-get --purge remove Remove the named package and all
its configuration files. Remove the
--purge keyword to keep config
files.
sudo apt-get -f install Do a sanity check for broken packages.
This tries to fix any “unmet
dependency” messages.
apt-config -V Print version information of installed
APT utilities.
sudo apt-key list List gpg keys that APT knows about.
apt-cache stats Print statistics on all packages
installed.
apt-cache depends Print dependencies for a package
(whether it’s installed or not).
apt-cache pkgnames List all packages installed on the
system.


dpkg -c <.deb file> Lists files which are installed by the
.deb file given (.deb file must be
path/filename).
dpkg ?I <.deb file> Lists information about the .deb
given file.
dpkg ?p Lists information about the package.
dkpg ?S Lists the packages where the given
file name is found. This can be a path,
or just the name of a file.

dpkg ?l Lists installed packages. This will also
take options for more specific info.
dpkg -L Lists all the files which have been
installed from package (package must
have been previously installed).
dpkg ?s Lists the status of the given package.
sudo dpkg ?i <.deb file> Installs the given .deb file.
sudo dpkg ?r Removes the given package from the
system, but leaves files behind.
sudo dpkg ?P Removes package and config files of
given package.
sudo dpkg -x <.deb file> Extracts the files contained in the
.deb file to a destination directory.
Note that this will reset permissions
on the target directory.
推荐阅读
  • 本文详细记录了在基于Debian的Deepin 20操作系统上安装MySQL 5.7的具体步骤,包括软件包的选择、依赖项的处理及远程访问权限的配置。 ... [详细]
  • 本文介绍了一款用于自动化部署 Linux 服务的 Bash 脚本。该脚本不仅涵盖了基本的文件复制和目录创建,还处理了系统服务的配置和启动,确保在多种 Linux 发行版上都能顺利运行。 ... [详细]
  • 解决微信电脑版无法刷朋友圈问题:使用安卓远程投屏方案
    在工作期间想要浏览微信和朋友圈却不太方便?虽然微信电脑版目前不支持直接刷朋友圈,但通过远程投屏技术,可以轻松实现在电脑上操作安卓设备的功能。 ... [详细]
  • 本文详细介绍了如何在Ubuntu系统中下载适用于Intel处理器的64位版本,涵盖了不同Linux发行版对64位架构的不同命名方式,并提供了具体的下载链接和步骤。 ... [详细]
  • 本文介绍如何通过更改软件源来提前体验Ubuntu 8.10,包括详细的配置步骤和相关注意事项。 ... [详细]
  • 搭建Jenkins、Ant与TestNG集成环境
    本文详细介绍了如何在Ubuntu 16.04系统上配置Jenkins、Ant和TestNG的集成开发环境,涵盖从安装到配置的具体步骤,并提供了创建Windows Slave节点及项目构建的指南。 ... [详细]
  • 本文详细介绍如何在 Windows 环境下安装 Ubuntu 12.04 版本的 Linux 操作系统,包括必要的软件下载、配置步骤以及注意事项。 ... [详细]
  • 随着技术社区的发展,越来越多的技术爱好者选择通过撰写博客来分享自己的学习经验和项目进展。本文将介绍一个具体案例,即将一套原本运行于Windows平台的代码成功移植到Linux(Redhat)环境下的过程与挑战。 ... [详细]
  • 本文详细介绍了在 Ubuntu 16.04 系统中使用 APT-GET 包管理器安装 MySQL 5.7 数据库的过程,并对安装后的文件和目录结构进行了说明,包括重要的配置文件及其功能。 ... [详细]
  • 当我在命令行登录MySQL后,无法访问任何依赖数据库连接的PHP应用。此问题每次都会出现。以下是复现问题的具体步骤及解决方案。 ... [详细]
  • 本文介绍了如何在Ubuntu 16.04系统上配置Nginx服务器,以便能够通过网络访问存储在服务器上的图片资源。这解决了在网页开发中需要使用自定义在线图标的需求。 ... [详细]
  • 本文探讨了Unix和Linux操作系统的起源和发展历程。从20世纪60年代计算机技术的初期阶段,到Unix的诞生及后续Linux的崛起,文章详细介绍了这些操作系统如何逐步成为现代计算不可或缺的一部分。 ... [详细]
  • 在Ubuntu 14.04 (Desktop AMD64) 上安装与配置ROS Indigo
    本文档详细介绍了如何在Ubuntu 14.04 (Desktop AMD64) 系统上安装和配置ROS Indigo。包括设置软件源、安装ROS核心组件、初始化rosdep以及创建ROS工作空间等步骤。 ... [详细]
  • 在即将迎来26岁生日之际,作者的人生陷入了低谷。经过近三年的硕士学习后,最终决定退学,并且面临没有工作经验的困境。尽管如此,作者依然坚定地选择为自己的人生负责。 ... [详细]
  • 在网页开发中,页面加载速度是一个关键的用户体验因素。为了提升加载效率,避免在PageLoad事件中进行大量数据绑定操作,可以采用异步加载和特定控件来优化页面加载过程。 ... [详细]
author-avatar
贾春雨-cherry
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有