Linux apt-cache, Ubuntu tutorial: apt-cache, apt-get use

If you use Ubuntu for the first time, you must be very disappointed when you open the software center and see the poor software. Is the famous Linux only available in so few software? Of course not. The software center is just a software library provided by Ubuntu. The vast ocean of Linux software is actually stored in various mirror sites. Only by mastering the software management commands can you fully use the convenient functions of Linux.

Apt-cache and apt-get are apt package management tools. They search for target software according to the software source address list in /etc/apt/sources.list, and install and uninstall software by maintaining a local package list.

apt cache

Find a package

$apt-cache search package_name

View package information

$apt-cache show package_name

View package dependencies

$apt-cache depends package_name

View brief information about each package

$apt-cache dump

apt-get

install a package

$apt-get install package_name

Update installed packages

*$apt-get upgrade

Update package list

**$apt-get update

Uninstall a package but keep related configuration files

**$apt-get remove package_name

Uninstall a package while removing configuration files

**$apt-get -purge remove package_name

Remove backups of packages

$apt-get clean

0b1331709591d260c1c78e86d0c51c18.png

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=324114265&siteId=291194637