Ubuntu apt-GET command details

Source: Internet
Author: User

Apt-GET command parameters in Ubuntu

Common apt Command Parameters

Apt-cache search package

Apt-Cache show package obtains package information, such as description, size, and version.

Sudo apt-Get install package installation package

Sudo apt-Get install package--reinstall re-installation package

Sudo apt-get-F install fix and install "-F =-fix-missing"

Sudo apt-Get remove package Delete package

Sudo apt-Get remove package--Purge delete a package, including deleting a configuration file.

Sudo apt-Get Update update source

Sudo apt-Get upgrade updates installed packages

Sudo apt-Get dist-upgrade System

Sudo apt-Get dselect-upgrade using dselect

Apt-Cache depends package for dependency usage

Apt-Cache rdepends package is used to check which packages are dependent on this package.

Sudo apt-Get build-dep package installation-related compilation environment

Apt-Get source packageSource code

Sudo apt-Get Clean & sudo apt-Get autoclean clear useless packages

Sudo apt-Get check whether any corrupted dependency exists

Where:

1. If sudo exists, administrator privileges are required!

2. In ubuntu, the short parameter is "-", and the long parameter is "-".

3. You can use the man command to view the help information or

Command-H (--Help) to view

4. to exit the command in the man command, press "Q !!

Option description

Use Sudo-H help to list usage methods and exit.

Sudo-V version displays the version information and exits.

Sudo-l list lists the commands that can be executed by the current user. This option can only be used by users in sudoers.

Sudo-u username | # uid user executes commands as a specified user. The following users are not only root users, but also usernames or # UIDs.

Sudo-K kill clears the time on the "admission ticket" and enters the password next time you use sudo.

Sudo-K sure kill is similar to-K, but it also needs to tear up the "Admission volume", that is, delete the timestamp file.

Sudo-B command background executes the specified command in the background.

Sudo-P prompt command prompt can change the prompt message for asking the password, where % u is replaced by the user account name, and % H displays the host name. Very user-friendly design.

Sudo-e file edit is equivalent to sudoedit, instead of executing a command, but modifying a file.

(Original address:
Http://blog.csdn.net/guopengzhang/archive/2009/12/08/4960964.aspx)

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.