deb包的安装及dpkg命令小结
DPKG commands
There are two actions, they are dpkg-query
and dpkg-deb
.
Install a package
# sudo dpkg -i {package_name}
# sudo dpkg -i skype-ubuntu-precise_4.2.0.11-1_i386.deb
Remove a package
# sudo dpkg -r {package_name}
# sudo dpkg -r vlc
Remove a package and its configuration files
# sudo dpkg -P {package_name}
# sudo dpkg -P vlc
List all installed packages.
You can pipe the command to less
(a pager) so you can more easily scroll the content:
# dpkg -l | less
Check if the package is installed or not
# dpkg -l {package_name}
# dpkg -l vlc
Check if the package is installed or not, and if it is, launch it:
# dpkg -l | vlc
See whether a package is installed or not
And this will show the location where the package will be installed. Here -S
(capital S
) to search whether the package was installed or not.
# sudo dpkg -S {package_name}
# sudo dpkg -S skype
Install a *.deb package from a specified location
Here -R
is recursive. (Recursively handle all regular files matching the pattern *.deb
found at specified directories and all of its subdirectories).
# sudo dpkg -R --install {package_location}
# sudo dpkg -R --install /home/sysadmin/soft
Show package details
Here -p
(lowercase p
) will show the package info:
# dpkg -p {package_name}
# dpkg -p apache2
View the content of a package
Use -c
(lowercase c
) to show the content:
# sudo dpkg -c {package_name}
# sudo dpkg -c skype-ubuntu-precise_4.2.0.11-1_i386.deb
Extract the *.deb
package file
Use -x
(lowercase x
) to extract:
# dpkg -x {package_name} {location_were_to_extract}
# dpkg -x libqt4-phonon_4.6.3-4+squeeze1_i386.deb /home/sysadmin/
Extract and display the filenames contained in a package
Use -X
(uppercase X
) to display the content with extraction.
# dpkg -X {package_name} {location_were_to_extract}
# dpkg -X libqt4-phonon_4.6.3-4+squeeze1_i386.deb /home/sysadmin/
Display information about a package
Here -I
stands for information:
# dpkg -I {package_name}
# dpkg -I libqt4-phonon_4.6.3-4+squeeze1_i386.deb
Reconfigure an already installed package
dpkg-reconfigure
reconfigures packages after they already have been installed. Pass it the name(s) of a package or packages to reconfigure. It will ask configuration questions, much like when the package was first installed.
# dpkg-reconfigure postfix
This will reconfigure postfix
the same way as when you installed it for the first time.
Need to know more about dpkg
commands? Have a look at the manual page:
# man dpkg
原文:http://askubuntu.com/questions/40779/how-do-i-install-a-deb-file-via-the-command-line
deb包的安装及dpkg命令小结的更多相关文章
- Ubuntu下deb包的安装方法 (zz)
Ubuntu下deb包的安装方法 分类: Ubuntu10使用技巧 2010-10-11 23:49 42969人阅读 评论(3) 收藏 举报 ubuntudebdebianlinux deb是deb ...
- ubuntu下deb包的安装方法
ubuntu下deb包的安装方法 简介 deb是debian linus的安装格式,跟red hat的rpm非常相似,最基本的安装命令是:dpkg -i file.deb dpkg 是Debian P ...
- 【转】Ubuntu下deb包的安装方法
[转]Ubuntu下deb包的安装方法 deb是debian linus的安装格式,跟red hat的rpm非常相似,最基本的安装命令是:dpkg -i file.deb dpkg 是Debian P ...
- 转载:Ubuntu下deb包的安装方法
转载:Ubuntu下deb包的安装方法,http://blog.csdn.net/kevinhg/article/details/5934462 deb是debian linus的安装格式,跟red ...
- linux中管理包的apt和dpkg命令用法
1,apt-get命令 apt-get是debian,ubuntu发行版的包管理工具,与红帽中的yum工具非常类似,适用于deb包管理式的操作系统,主要用于自动从互联网的软件仓库中搜索.安装.升级.卸 ...
- Ubuntu下deb包的安装方法 - kevinhg的博客 - 博客频道 - CSDN.NET
Ubuntu下deb包的安装方法 - kevinhg的博客 - 博客频道 - CSDN.NET dpkg -i
- debian下系列下的apt-get 命令与deb包的手动安装的dpkg命令
手动下载的deb包的相关操作: 操作deb 使用dpkg 命令工具, dpkg 是Debian package的简写. 下面列举常用的 操作: dpkg –I name.deb 查看 包的详细信息( ...
- Linux 学习日记 2 (常用命令 + deb包的安装)
常用命令:以下是一些比较常用的命令,主要是关于安装软件的一些命令 @_@ cd ~/下载(文件名)/ //进入这个文件夹 , ~指的是根目录 cd .. //返回上一级文件夹 sudo apt-get ...
- .deb 包如何安装到指定目录; Ubuntu; Debian like;
有时候,我们没有root用户的时候,我们进行安装deb包就不能之间安装到系统之中了: 为了方便,我们可以直接解压 dpkg -x same.deb .; 直接解压到当前目录,然后在配置环境变量,即可启 ...
随机推荐
- 【原】AFNetworking源码阅读(二)
[原]AFNetworking源码阅读(二) 本文转载请注明出处 —— polobymulberry-博客园 1. 前言 上一篇中我们在iOS Example代码中提到了AFHTTPSessionMa ...
- Hawk 6. 编译和扩展开发
Hawk是开源项目,因此任何人都可以为其贡献代码.作者也非常欢迎使用者能够扩展出更有用的插件. 编译 编译需要Visual Stuido,版本建议使用2015, 2010及以上没有经过测试,但应该可以 ...
- iOS开发之Alamofire源码深度解析
今天博客中的Alamofire源码的版本是以现在最新的3.4版本为例.上篇博客系统的对NSURLSession相关的东西进行了详细的解析,详情请看<详解NSURLSession>,为了就是 ...
- Autofac - MVC/WebApi中的应用
Autofac前面写了那么多篇, 其实就是为了今天这一篇, Autofac在MVC和WebApi中的应用. 一.目录结构 先看一下我的目录结构吧, 搭了个非常简单的架构, IOC(web), IBLL ...
- 企业做数据缓存是使用Memcached还是选Redis?
企业是使用Memcached还是选Redis? 在构建一款现代且由数据库驱动的Web应用程序并希望使其拥有更为出色的性能表现时,这个问题总会时不时出现.并给每一位开发人员带来困扰.在考虑对应用程序的性 ...
- Android系统默认对话框添加图片
开发工具Android Studio 今天公司UI要求软件对话框改成加图片的,以前没有做过,所以就学习了一下,废话不多说, 看效果: 创建XML文件dialog_lsit_item.xml <L ...
- Lucene4.4.0 开发之排序
排序是对于全文检索来言是一个必不可少的功能,在实际运用中,排序功能能在某些时候给我们带来很大的方便,比如在淘宝,京东等一些电商网站我们可能通过排序来快速找到价格最便宜的商品,或者通过排序来找到评论数最 ...
- zookeeper集群的搭建以及hadoop ha的相关配置
1.环境 centos7 hadoop2.6.5 zookeeper3.4.9 jdk1.8 master作为active主机,data1作为standby备用机,三台机器均作为数据节点,yarn资源 ...
- 绿色版的Linux.NET——“Jws.Mono”(续)
在前一篇文章中,我们简略的介绍了jws.mono的安装使用,以及我们如何自己动手做一个jws.mono出来. 在文章发表之后的几天里,我一直觉得有点不妥之处,直到后来猛然的意识到:我们自己动手做的jw ...
- 集成基于OAuth协议的单点登陆
在之前的一篇文章中,我们已经介绍了如何为一个应用添加对CAS协议的支持,进而使得我们的应用可以与所有基于CAS协议的单点登陆服务通讯.但是现在的单点登陆服务实际上并不全是通过实现CAS协议来完成的.例 ...