Package Management,也就是包管理 其实常用命令就那几个…… 所以列一下吧
根据名字查找包
- pacman:
- pacman -Ss <string>
- ports:
- psearch <string>
- apt / dpkg:
- apt-cache search <string>
- yum / rpm:
- yum search <string>
查询文件属于哪个包
已安装
- pacman:
- pacman -Q -o <path>
- ports:
- pkg_info -W <path>
- pkg_which <path>
- apt / dpkg
- dpkg -S <path>
- yum / rpm:
- rpm -q -f <path>
未安装
Google <file name>
列出某包文件列表
- pacman:
- pacman -Q -l <package name>
- ports:
- pkg_info -L <package name with package version>
- pkg_info -L <package name>-\* // hackish!
- apt / dpkg:
- dpkg -L <package name>
- yum / rpm:
- rpm -q -l <package name>
装
- pacman:
- pacman -S <package name>
- ports:
- pkg_add -r <package name>
- portinstall -PPv <package name>
- cd <package path>; make install
- apt / dpkg:
- apt-get install <package name>
- yum / rpm:
- yum install <package name>
删
- pacman:
- pacman -R <package name>
- ports:
- pkg_delete <package name with version>
- apt / dpkg:
- apt-get remove <package name>
- yum / rpm:
- yum remove <package name>