Package Management,也就是包管理 其实常用命令就那几个…… 所以列一下吧

根据名字查找包

  • pacman:
  1. pacman -Ss <string>
  • ports:
  1. psearch <string>
  • apt / dpkg:
  1. apt-cache search <string>
  • yum / rpm:
  1. yum search <string>

查询文件属于那个包

已安装

  • pacman:
  1. pacman -Q -o <path>
  • ports:
  1. pkg_info -W <path>
  2. pkg_which <path>
  • apt / dpkg
  1. dpkg -S <path>
  • yum / rpm:
  1. rpm -q -f <path>

未安装

Google <file name>

列出某包文件列表

  • pacman:
  1. pacman -Q -l <package name>
  • ports:
  1. pkg_info -L <package name with package version>
  2. pkg_info -L <package name>-\* // hackish!
  • apt / dpkg:
  1. dpkg -L <package name>
  • yum / rpm:
  1. rpm -q -l <package name>

  • pacman:
  1. pacman -S <package name>
  • ports:
  1. pkg_add -r <package name>
  2. portinstall -PPv <package name>
  3. cd <package path>; make install
  • apt / dpkg:
  1. apt-get install <package name>
  • yum / rpm:
  1. yum install <package name>

  • pacman:
  1. pacman -R <package name>
  • ports:
  1. pkg_delete <package name with version>
  • apt / dpkg:
  1. apt-get remove <package name>
  • yum / rpm:
  1. yum remove <package name>