Detailed explanation of ubuntu apt-get command

apt-get command parameters under ubuntu

  Commonly used APT command parameters

  apt-cache search package Search packages

  apt-cache show package Get information about the package, such as description, size, version, etc.

  sudo apt-get install package install package

  sudo apt-get install package --reinstall to reinstall the package

  sudo apt-get -f install fix install "-f= --fix-missing"

  sudo apt-get remove package remove package

  sudo apt-get remove package -- -- purge removes packages, including removing configuration files, etc.

  sudo apt-get update update source

  sudo apt-get upgrade to update installed packages

  sudo apt-get dist-upgrade upgrade system

  sudo apt-get dselect-upgrade upgrade using dselect

  apt-cache depends package to understand using dependencies

  apt-cache rdepends package is to see which packages depend on the package

  sudo apt-get build-dep package install related compilation environment

  apt-get source package Download the source code of the package

  sudo apt-get clean && sudo apt-get autoclean clean useless packages

  sudo apt-get check to check for broken dependencies

  in:

  1 With SUDO, it requires administrator privileges!

  2 In UBUNTU, the parameters behind the command are short parameters, which are drawn with "-", and long parameters with "-".

  3 Command help information can be viewed by the man command or

  Command -H (--help) mode to view

  4 In the MAN command, if you need to exit the command help, please press the "q" key! !

  option meaning

  sudo -h Help List usage, exit.

  sudo -V Version displays version information and exits.

  sudo -l List Lists the commands that the current user can execute. Only users in sudoers can use this option.

  sudo -u username|#uid User Executes the command as the specified user. The following users are other than root, which can be username or #uid.

  sudo -k Kill clears the time on the "ticket", and the password is required the next time you use sudo.

  sudo -K Sure kill is similar to -k, but it also rips the "entry roll", that is, deletes the timestamp file.

  sudo -b command Background executes the specified command in the background.

  sudo -p prompt command Prompt can change the prompt language asking for password, where %u will be replaced by the user account name, and %h will display the host name. Very user-friendly design.

  sudo -e file Edit is not to execute the command, but to modify the file, which is equivalent to the command sudoedit.

       Reprinted: http://blog.csdn.net/guopengzhang/article/details/4960964

 
top
0
step on

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326259556&siteId=291194637