Sudo: sudo is a Linux system management command. It is a tool that allows the system administrator to allow common users 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 <package> and all dependent packages, and install or upgrade the 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 <package> and any other packages dependent on this 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, which runs at least once a day and changes/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. we recommend that you use the & # 39-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 <pattern>: Search meets <p The package and description of attern>. apt-Cache show <package>: displays the complete description of <package>. apt-Cache showpkg <package>: displays <package> many details and 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.