Welcome 微信登录

首页 / 操作系统 / Linux / Apt-get | DPKG | YUM 使用相关简介(英文)

在这里给大家总结下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

Ubuntu 11.04 AMD64 DVD iso做软件源Linux根分区扩容相关资讯      Linux知识 
  • 时光总是太匆匆!Linux已经诞生23  (08/29/2014 14:12:03)
  • Linux虚拟文件系统之文件打开(sys  (02/14/2012 11:41:54)
  • 2012 年 Linux 峰会时间表  (02/14/2012 06:47:27)
  • 报告称当前 Linux 人才抢手 高薪也  (02/15/2012 06:35:56)
  • 解析企业为何选择Linux及其特别之  (02/14/2012 08:17:59)
  • Linux禁用字符闪烁的方法  (11/02/2011 10:28:25)
本文评论 查看全部评论 (0)
表情: 姓名: 字数