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 .; 直接解压到当前目录,然后在配置环境变量,即可启 ...
随机推荐
- 【干货分享】流程DEMO-离职流程
流程名: 离职申请 流程相关文件: 流程包.xml WebService业务服务.xml WebService.asmx WebService.cs 流程说明: 流程中集成了webservic ...
- TypeScript
TypeScript: Angular 2 的秘密武器(译) 本文整理自Dan Wahlin在ng-conf上的talk.原视频地址: https://www.youtube.com/watch? ...
- raspberrypi(树莓派)上安装mono和jexus,运行asp.net程序
参考网址: http://www.linuxdot.net/ http://www.cnblogs.com/mayswind/p/3279380.html http://www.raspberrypi ...
- HTML5- Canvas入门(五)
今天要介绍的是canvas对图形对象的操作,包括图像.视频绘制,和操作像素对象的方法. 图片/视频的绘制 在canvas中,我们可以通过 drawImage() 的方法来绘制图片或视频文件,其语法为: ...
- Microsoft Azure Web Sites应用与实践【4】—— Microsoft Azure网站的“后门”
Microsoft Azure Web Sites应用与实践 系列: [1]—— 打造你的第一个Microsoft Azure Website [2]—— 通过本地IIS 远程管理Microsoft ...
- C# - 缓存OutputCache(一)基础配置
本文是通过网上&个人总结的 1. 介绍 OutputCache输出缓存是复制ASP.NET页面,保存在内存的机制.这种行为有助于提高性能,通过返回的缓存达到网页及时响应的目的,减少客户机器需要 ...
- Android-横竖屏切换问题(转)
先附上链接:http://www.cnblogs.com/xiaoQLu/p/3324503.html 项目要求要做横竖屏,发现横屏的时候,生命周期函数会乱执行,网上找了一大堆资料. 结果如下: 只需 ...
- 【解决方案】 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userHandler': Injection of resource dependencies failed;
一个错误会浪费好多青春绳命 鉴于此,为了不让大家也走弯路,分享解决方案. [错误代码提示] StandardWrapper.Throwableorg.springframework.beans.fac ...
- Ninesky源代码从Codeplex迁移到开源中国
原来Ninesky代码一直发在Codeplex.com上,最近两三个星期了代码一直迁入不上去,网站访问也经常出错. 所以把代码放到开源中国去了,项目地址https://git.oschina.net/ ...
- KindEditor 给KindEditor赋值
在项目的过程中,使用了KindEditor编辑器,然后在赋值的时候,我的编辑器ID是content,然后我想通过$("#content").html()来赋值,发现赋值失败,后来百 ...