APT usage in Ubuntu

Source: Internet
Author: User

How to directly find the software you want to install under Ubuntu. For example, I want to install Tomcat, but I don't know which version is in Ubuntu or what I need to install, but I can confirm that I have installed tomcat. Then I can use the search command: for example: $ apt-cache search Tomcat then I will get the following results: libtomcat5-java-Java Servlet Engine -- core Libraries

...................

In this way, I know that Ubuntu's software library contains Tomcat 5, so I can use $ apt-Get install tomcat5 to install apt from Debian GNU/Linux.

Similarly, APT has many commands available:
(1) apt-cache search: we can use this command to search for upgrade packages, for example, Apt-cache search httpd.
(2) apt-Cache show package obtains package information, such as description, size, and version.
(3) apt-Cache depends dependency: we can use this command to view all dependency files of the software package, for example: APT-Cache depends httpd

(4) apt-Cache rdepends package is used to check which packages are dependent on this package.
(5) apt-Get clean: When the installation kit is installed using the apt-Get install command, the downloaded RPM will be placed in/var/Cache/APT/archives, you can clear the apt-Get clean command to avoid occupying hard disk space.
(6) apt-Get remove: for example, Apt-Get remove httpd will be removed. If there is a dependency suite, APT will also be removed.
(7) apt-Get Update update source. It mainly updates apt information sources.
(8) sudo apt-Get upgrade Update installed packages
(9) apt-Get source package download the source code of the package

 

Http://hain.javaeye.com/blog/155672 ()

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.