25个有用的基础命令apt-get/apt-cache

来源:互联网 发布:windows sail.js 编辑:程序博客网 时间:2024/05/22 04:30

这篇文章可以帮助我们快速了解apt-get/apt-cache命令,来实现安装/卸载/升级/查找包。
什么是apt-get?
apt-get是一个非常有用的linux开源命令,可以和ubuntu的apt工具命令配合使用,来实现安装软件和卸载软件,升级已安装软件,甚至整个系统。
什么是apt-cache?
apt-cache是用来查找软件包,收集包信息,以及查看ubutu和debian上哪些包是可用的。
5个基础的apt-cache命令

$ apt-cache pkgnames  //list all the available packages

安装软件之前,在apt-cache命令后添加search标签,可以展示对应的包信息和简要描述信息,举例如下:

$ apt-cache search vsftpdvsftpd - lightweight, efficient FTP server written for securityccze - A robust, modular log coloriserftpd - File Transfer Protocol (FTP) serveryasat - simple stupid audit tool
$ apt-cache pkgnames vsftpd  //To find and list down all the packages starting with ‘vsftpd‘
$ apt-cache show netcat

原文链接:25 Useful Basic Commands of APT-GET and APT-CACHE for Package Management