手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

Apt-get | DPKG | YUM 使用相关简介(英文)

[日期:2011-06-20] 来源:bentutu.com  作者:tuhaihe [字体: ]
在这里给大家总结下Apt-get,DPKG,YUM 使用的相关参数。我这里没有翻译过来,因为是在英文系统状态下。各位见谅。

#1,Apt-Get


1
$ apt-get --option -o command

– This is the standard usage for the apt-get command.

1
$ apt-get -h

– Use this command to get more help.

1
--update

– This will find updates for all packages from locations listed in /etc/apt/sources.list. You should always run an update before attempting an upgrade or a dist-upgrade.

1
--upgrade

– Use this to install the newest versions of all packages. Make sure you use the update command to check your sources.list for the newest versions first.

1
--dist-upgrade

– This will upgrade your distribution to the newest version. And will also upgrade all packages in your sources.list.

1
--install

– Used this with the desired packages to install them. If you install a package that has pre-requisites or related packages apt-get will grab them for you.

1
--remove

– This will remove packages from your system.

1
--purge

– This is the same as remove but with purge you can delete configuration files also.

#2, DPKG


1
$ dpkg --option package

– This is the standard usage for the DKPG command.

1
$ dpkg -s package | grep Status

– Use this to find out if a package is installed or not.

1
$ dpkg -s package

– See if a package is installed, as well as other useful information.

1
$ dpkg -S /file

– With this option you can find out which package a file belongs to.

1
$ dpkg -S package

$ dpkg -c package.deb – This will list all files related to the package.

1
$ dpkg -C

– This will search for broken packages.

1
$ dpkg -L package

– You can use this to list the locations of files added by the chosen package.

1
$ dpkg -l

– Get a list of installed packages and a short description.

1
$ dpkg -l package

– Will list specified package with a short description.

1
$ dpkg -i package.deb

– Use this to install a package or upgrade already installed packages.

1
$ dpkg -r package

– This will remove an installed package.

1
$ dpkg -R /directory

– With this you can install all packages recursively from the specified directory.

1
$ dpkg -P package

– You can remove an installed package but leave the configuration files with the purge option.

1
$ dpkg -p package

– You can use this to get further details about a package.

1
$ dpkg -h

– Get additional help with DPKG.

#3,Yum

linux
相关资讯       Linux知识 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款