Ubuntu Update command

Source: Internet
Author: User
The ubuntu Update command is a non-root update command: sudo is a linux system management command that allows the system administrator to execute some or all of the root commands, such as halt, reboot, and su. This not only reduces the login of the root user...
The ubuntu Update command is a non-root update command: sudo is a linux system management command that allows the system administrator to execute some or all of the root commands, such as halt, reboot, and su. This not only reduces the login and management time of the root user, but also improves the security. Sudo is not a substitute for shell. it is intended for every command. Apt-get: apt-get is a linux command, applicable to deb package-managed operating systems, it is mainly used to search, install, upgrade, and uninstall software or operating systems from software warehouses on the Internet. The apt-get command generally requires the root permission for execution, so it is generally followed by the sudo command. Apt usage: www.2cto.com apt-cache search # ------ (package search package) apt-cache show # ------ (package obtains information about the package, 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 # ----- (force installation? # "-F = -- fix-missing" should be fixed and installed ...) sudo apt-get remove # ----- (Delete package) sudo apt-get remove--purge # ------ (delete package, including deleting configuration files) sudo apt-get autoremove -- purge # ---- (package deletes packages and their dependent packages + configuration files (only valid for 6.10, it is strongly recommended )) sudo apt-get update # ------ update source sudo apt-get upgrade # ------ update the installed package sudo apt-get dist-upgrade # --------- upgrade the system (preferably not needed) sudo apt-get dselect-upgrade # ------ use dselect to upgrade apt-cache depends #- ------ (Package knows how to use dependencies) apt-cache rdepends # ------ (package knows a specific dependency? # Check which packages the package depends on ...) sudo apt-get build-dep # ------ (package installation-related compilation environment) apt-get source # ------ (package download the source code of this package) sudo apt-get clean & sudo apt-get autoclean # -------- clean up the archive of downloaded files & only clear outdated packages sudo apt-get check # ------- check whether there is any corrupted dependency www.2cto.com apt-get install package name: download Install or upgrade all dependent packages. if a package is set to hold (stop flag, it will be put aside (that is, it will not be upgraded ). for more information about hold, see the following. apt-get remove [-- purge] package name: remove And any other packages that depend on the package. -- purge indicates that the package should be completely purged (purged). For more information, see dpkg-P. apt-get update: upgrade the package list from the Debian Image. if you want to install any software on the day, run it at least once a day and modify/etc/apt/sources each time. list, must be executed. apt-get upgrade [-u]: the package that has been installed is the latest available version. old packages will not be installed or removed. if a package has changed its dependency and needs to be installed with a new package, it will not be upgraded, but will be marked as hold. apt-get update will not upgrade the package marked as "hold" (this is what "hold" means ). see how to manually set the package to hold. I suggest using the '-U' option at the same time, because you can see which packages will be upgraded. www.2cto.com apt-get dist-upgrade [-u]: Similar to apt-get upgrade, apart from dist-upgrade, packages are installed and removed to satisfy the dependency. therefore, it is dangerous. apt-cache search : Search satisfied . Apt-cache show : Display . Apt-cache showpkg : Display Many details, as well as relationships with other packages. note: dselect, console-apt, aptitude, and gnome-apt are several graphical front ends of APT (some of which must be installed before use ). here, dselect is undoubtedly the most powerful, the oldest, and the most difficult to control. when you use apt-get to install LAMP, you 'd better first run the following command to upgrade your system to update the source. if the source you are looking for is not good, LMAP may fail to be installed. # Sudo apt-get update: obtain the list of the most recent packages. The list contains some package information, for example, whether the package has been updated # sudo apt-get dist-upgrade if the package has not been released, it will not matter. if the update is released, the package will be downloaded to the computer, and install. The apt-get update command www.2cto.com synchronizes the RPM index list (package list) of the user and the APT server. The RPM index list of the APT server is placed in the base folder, after the user's computer obtains the bz2 RPM index file in the base folder, it will be decompressed and placed in/var/state/apt/lists /, when you use the apt-get install or apt-get dist-upgrade command, the files in this folder are compared with the RPM database on the user's computer, in this way, you can know the RPM has been installed, not installed, or can be upgraded. The relationship between apt-get upgrade and apt-get dist-upgrade: There are various dependencies between packages. Upgrade is just a simple update package. Regardless of these dependencies, it does not add or delete packages. Dist-upgrade can add and delete packages based on dependency changes. Generally, you need to run update between running upgrade or dist-upgrade.
Related Article

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.