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 .; 直接解压到当前目录,然后在配置环境变量,即可启 ...
随机推荐
- html与html5
HTML 是一种在 Web 上使用的通用标记语言.HTML 允许你格式化文本,添加图片,创建链接.输入表单.框架和表格等等,并可将之存为文本文件,浏览器即可读取和显示.HTML 的关键是标签,其作用是 ...
- 解决PHP-问题:Class 'SimpleXMLElement' not found in
1.问题 在ubuntu 16.10中,学习PHP,学习到PHP如何生成XML文件时候,碰到了这个问题: PHP Fatal error: Class 'ClassName\SimpleXMLElem ...
- Gradle 实现 Android 多渠道定制化打包
Gradle 实现 Android 多渠道定制化打包 版权声明:本文为博主原创文章,未经博主允许不得转载. 最近在项目中遇到需要实现 Apk 多渠道.定制化打包, Google .百度查找了一些资料, ...
- java 利用ManagementFactory获取jvm,os的一些信息--转
原文地址:http://blog.csdn.net/dream_broken/article/details/49759043 想了解下某个Java项目的运行时jvm的情况,可以使用一些监控工具,比如 ...
- H5项目开发分享——用Canvas合成文字
以前曾用Canvas合成.裁剪.图片等<用H5中的Canvas等技术制作海报>.这次用Canvas来画文字. 下图中"老王考到驾照后"这几个字是画在Canvas上的,与 ...
- Java 堆内存与栈内存异同(Java Heap Memory vs Stack Memory Difference)
--reference Java Heap Memory vs Stack Memory Difference 在数据结构中,堆和栈可以说是两种最基础的数据结构,而Java中的栈内存空间和堆内存空间有 ...
- 【置顶】CoreCLR系列随笔
CoreCLR配置系列 在Windows上编译和调试CoreCLR GC探索系列 C++随笔:.NET CoreCLR之GC探索(1) C++随笔:.NET CoreCLR之GC探索(2) C++随笔 ...
- 关于DDD的学习资料汇总
DDD(Domain-Driven Design)领域驱动设计,第一次看到DDD是在学习ABP时,在其中的介绍中看到的.what,DDD是个什么鬼,我不是小白,是大白,没听过.于是乎,度娘查查查,找到 ...
- 为什么很多SaaS企业级产品都熬不过第一年
因工作缘由,笔者与周边数位SaaS企业级应用的创始人.运营负责人有过深入接触,发现一个有趣的现象:刚起步时,蓝图远志.规划清晰,但是一路下来,却异常艰难,有些甚至熬不过第一年,就关门歇业. 2015年 ...
- android Notification介绍
如果要添加一个Notification,可以按照以下几个步骤 1:获取NotificationManager: NotificationManager m_NotificationManager=(N ...