To the Ubuntu software Upgrade command
sudo apt-get Update--Updating the software source
sudo apt-get upgrade -Update the installed software
Update the system with a non-root user
Sudo:sudo is a Linux system Management Directive, a tool that allows the system administrator to let ordinary users perform some or all of the root commands, such as HALT,REBOOT,SU, and so on. This not only reduces the login and administration time of the root user, but also improves security. sudo is not a substitute for the shell, it is for each command.
Apt-get:apt-get is a Linux command for the Deb package managed operating system that is used to automatically search, install, upgrade, uninstall software, or the operating system from the Internet's software warehouse. Apt-get commands typically require root access, so follow the sudo command generally.
One, APT's use (Ubuntu Linux package management tool one)
Apt-cache Search #------(Package Finder)
Apt-cache Show #------(package gets information about packages, such as description, size, version, etc.)
sudo apt-get Install #------(Package installer)
sudo apt-get Install #-----(Package-Reinstall reinstall packages)
sudo apt-get-f Install #-----(Force install? # "-F =--fix-missing" when it is
Install it ...)
sudo apt-get Remove #-----(Package Delete pack)
sudo apt-get Remove--Purge #------(Package delete packages, including delete profiles
such as
sudo apt-get autoremove--purge #----(Package delete packages and their dependent packages + profiles etc (only valid for 6.10, highly recommended))
sudo apt-get update #------Updating source
sudo apt-get upgrade #------Update an installed package
sudo apt-get dist-upgrade #---------Upgrade System
sudo apt-get dselect-upgrade #------Upgrade with Dselect
Apt-cache depends #-------(package understands usage dependencies)
Apt-cache Rdepends #------(Package understands a specific dependency? #当是查看该包被哪些包依赖吧 ...)
sudo apt-get BUILD-DEP #------(Package Installation-related compilation environment)
Apt-get Source #------(Package downloads the source of the bundle)
sudo apt-get clean && sudo apt-get autoclean #--------cleanup download file saved
File && clean up outdated packages only
sudo apt-get check #-------checks for corrupted dependencies
Usage of Apt-get Install
Apt-get Install <package>
Download <package> and all dependent packages while installing or upgrading the package. If a package is set to hold (stop flag, it will be put aside (ie not be upgraded). For more hold details, see below.
Apt-get Remove [--purge] <package>
Remove <package> and any other packages that rely on this package.--purge indicates that the package should be completely cleared (purged), for more information please 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 at least once a day, and each time you modify the
After/etc/apt/sources.list, it must be executed.
Apt-get upgrade [-u]
Upgrade so the package that has been installed is the latest available version. No new or removed old packages will be installed. If a package changes dependency and requires a new package to be installed, it will not be upgraded, but is marked as hold. Apt-get update does not upgrade packages marked for Hold ( This is the meaning of hold. See below how to manually set the package to hold. I recommend using the '-u ' option at the same time, as you can see which packages will be upgraded.
Apt-get Dist-upgrade [-u]
Similar to Apt-get upgrade, except that Dist-upgrade installs and removes packages to meet dependency relationships. Therefore, it has certain danger.
Apt-cache Search <pattern>
Search for packages and descriptions that meet <pattern>.
Apt-cache Show <package>
Displays the full description of the <package>.
Apt-cache showpkg <package>
Display <package> Many details, as well as relationships with other parcels.
Dselect, CONSOLE-APT, Aptitude, gnome-apt, are several graphical front ends of apt (some of which have to be installed before use). Here Dselect is undoubtedly the most powerful, is also the oldest, the most difficult to harness.
To install lamp with Apt-get this way, it is best to run the following command to upgrade your system in order to update the source, and if the source you are looking for is not good, you may have failed to install Lmap.
#sudo apt-get update to get a list of the most recent packages, and the list contains information about the packages, such as whether the package has been updated
#sudo Apt-get Dist-upgrade If the package does not have an update, regardless of its If an update is released, download the package to your computer and install it. The
Apt-get Update instruction synchronizes the RPM index list of the consumer and APT servers (the package list), the RPM index list of the APT server is placed in the base folder, and the user-side computer obtains the BZ2 RPM index list compression file in the base folder , it will be unpacked in/var/state/apt/lists/, and users use Apt-get install or apt-get dist-upgrade command, the data in this folder and the user-side computer in the RPM database, As a result, you know that those RPMs are installed, not installed, or can be upgraded.
Here is a reference to the relationship between Apt-get upgrade and Apt-get Dist-upgrade
Because of the various dependencies between packages and packages. Upgrade is just a simple update package, regardless of these dependencies, it does not add packages, or delete packages. Instead, Dist-upgrade can add packages and delete packages based on changes in dependency relationships. The
is typically run between upgrade or Dist-upgrade to run update.
Last Run as follows
#sudo apt-get install mysql-server
Installation mysql5
#sudo apt-get install apache2
Install the apache2
#sudo apt-get install php5
installation php5
#sudo apt-get Install php5-mysql
Install the PHP mysql module
#sudo Apt-get Install PHP5-GD
sudo (apt-get update && apt-get dist-upgrade && apt-get Autoremove && apt-get AutoClean) package
Upgrade management of software in Ubuntu-(go from Josh_)