Detailed explanation of apt-get command in Ubuntu

Package mechanism management: Different distributions have different package management mechanisms.

"In the beginning there was only .tar.gz in GNU/Linux systems. Users had to compile every program they wanted to use themselves. After Debian came along, it was considered necessary to add a mechanism to the system to manage the software installed on the computer Package. People call this system dpkg. The famous 'package' first appeared on GNU/Linux. Soon after, red hats also started to build their own package management system 'rpm'.

"The creators of GNU/Linux were quickly caught in a new quandary. They wanted a fast, practical, and efficient way to install packages. These packages could automatically handle dependencies between each other and update They maintain their configuration files in the process. Debian once again acted as a pioneer. She pioneered APT (Advanced Packaging Tool). This tool was later ported by Conectiva to Red Hat for rpm package management. Among other We can also see her in some distributions."

  • -- Excerpted from Debian APT HOWTO

"At the same time, apt is a very complete and advanced package management program, using it allows you to easily and accurately find the packages you want, and install or uninstall them very simply. It also allows you to All software is up to date and can also be used to upgrade Ubuntu ."

"apt is a software that requires commands to operate, but there are also many software with graphics, such as Synaptic, Kynaptic and Adept."

Ubuntu APT common command parameters

Introduce the Ubuntu APT command parameters in detail, let everyone understand the use of Ubuntu APT command parameters, and hope it will be useful to everyone. Ubuntu is a completely Linux-based operating system that is freely available with community and professional support.

  Commonly used Ubuntu 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, administrator privileges are required!

  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) way to view

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

  Ubuntu APT option meaning and effect

  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.

  The above Ubuntu APT command parameters are introduced

{{o.name}}
{{m.name}}

Guess you like

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