Ubutun upgrade command

Source: Internet
Author: User

sudo apt-get update  --更新软件源
sudo apt-get upgrade  -更新已经安装的软件
 

Update the system as a non-Root User

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.

I. Use of APT (Ubuntu Linux package management tool I) apt-cache search # ------ (package search package) apt-Cache show # ------ (package obtains package information, 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" is to fix the installation ...) 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 installed sudo apt-Get dist-upgrade # --------- upgrade system sudo apt-Get dselect-upgrade # ------ use dselect to upgrade apt-Cache depends #----- -- (Package knows how to use dependencies) apt-Cache rdepends # ------ (How does package know 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 files downloaded & only clear outdated packages sudo apt-Get check # ------- check for any corrupted Dependencies
Apt-Get install usage apt-Get install <package> download <package> and all dependent packages, and install or upgrade the packages at the same time. 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> remove <package> and any other packages that depend 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 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] is upgraded, so the installed package 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.
Apt-Get dist-upgrade [-u] is similar to Apt-Get upgrade. Apart from dist-upgrade, it installs and removes packages to satisfy the dependency. Therefore, it is dangerous.
Apt-cache search <pattern> searches for packages and descriptions that meet <pattern> requirements.
Apt-Cache show <package> shows the complete description of <package>.
Apt-Cache showpkg <package> shows many details and relationships with other packages.
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 获得最近的软件包的列表;列表中包含一些包的信息,比如这个包是否更新过 #sudo apt-get dist-upgrade 如果这个包没有发布更新,就不管它;如果发布了更新,就把包下载到电脑上,并安装。 apt-get update 指令会同步使用者端和APT 伺服器的RPM 索引清单(package list),APT 伺服器的RPM 索引清单置于base 资料夹内,使用者端电脑取得base 资料夹内的bz2 RPM 索引清单压缩档后,会将其解压置放于/var/state/apt/lists/,而使用者使用apt-get install 或apt-get dist-upgrade 指令的时候,就会将这个资料夹内的资料和使用者端电脑内的RPM 资料库比对,如此一来就可以知道那些RPM 已安装、未安装、或是可以升级的。 这里提一下apt-get upgrade 与apt-get dist-upgrade的关系 由于包与包之间存在各种依赖关系。upgrade只是简单的更新包,不管这些依赖,它不和添加包,或是删除包。而dist-upgrade可以根据依赖关系的变化,添加包,删除包。 一般在运行upgrade或dist-upgrade之间,要运行update.
最后运行如下
#sudo apt-get install mysql-server 安装上mysql5 #sudo apt-get install apache2 安装apache2 #sudo apt-get install php5 安装php5 #sudo apt-get install php5-mysql 安装php的mysql模块 #sudo apt-get install php5-gd

sudo (apt-get update && apt-get dist-upgrade && apt-get autoremove && apt-get autoclean)包

Ubutun upgrade command

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.