Ubuntu Linux: How Do I install .deb Packages?

Ubuntu Linux: How Do I install .deb Packages?

Ubuntu Linux: How Do I install .deb Packages?

by Nix Craft on June 22, 2006 · 63 comments· LAST UPDATED August 11, 2013

in Debian / Ubuntu, Package Management, Ubuntu Linux

 

I am a new Ubuntu Linux user. I need to install a package called package.deb. I know I can use Synaptic front-end package management tool to install packages from the CD or Internet. But, I would like to install a special .deb file. How can I install .deb package from the terminal using command line option in Ubuntu Linux or Debian Linux?

Tutorial details 
DifficultyEasy (rss)
Root privilegesNo
Requirementsdpkg
Estimated completion time1m
You need to use the dpkg command, which is a package manager from shell/command prompt for Debian and Ubuntu Linux. You can use this tool to install, build, remove and manage packages. dpkg itself is controlled entirely via command line parameters.

 

Syntax

The syntax is as follows:

 
dpkg -i package-name-here.deb
dpkg --install package-name-here.deb
dpkg -i -R /path/to/dir/name/with/lots/of/dot-deb-files/
dpkg -i --recursive /path/to/dir/name/with/lots/of/dot-deb-files/
 

Where,

  1. -i or --install : Install the package.
  2. -R or --recursive : Recursively installed all *.deb files found at specified directories and all of its sub-directories. /path/to/dir/name/with/lots/of/dot-deb-files/ must refer to a directory instead of package-name-here.deb file name.

How do I install .deb file?

To install a single package file called /tmp/package.deb type the following commands. Open a terminal and then cd to directory where package.deb is kept. In this example, package.deb is kept in /tmp directory:
$ cd /tmp
Type the following command to install the package:
$ sudo dpkg -i package.deb
OR
# dpkg -i package.deb

Install all packages from /nfs/pkgs/ubuntu-builds directory

Recursively handle and install all regular files matching pattern *.deb found at /nfs/pkgs/ubuntu-builds/ directory and all of its subdirectories, type:
$ sudo dpkg -i -R /nfs/pkgs/ubuntu-builds/
OR
# dpkg -i -R /nfs/pkgs/ubuntu-builds/

posted on 2014-03-08 10:50  lexus 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/lexus/p/3587636.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值