Modify various versions of Ubuntu source

Source: Internet
Author: User

Please use root  to execute the script #!/bin/bashapt_dir= "/etc/apt" version= ' awk  ' { print $2 } '  /etc/issue ' case  $VERSION  in    14.04|14.04.1 )  release= "Trusty"  ;;     13.04|13.04.1 )  release= "raring"  ;;     13.10 )  release= "Saucy"  ;;     12.04|12.04.1|12.04.2|12.04.3|12.04.4|12.04.5 )  release= "precise"  ;;     12.10 )  release= "Quantal"  ;;     11.04 )  release= "Natty"  ;;     11.10 )  release= "Oneiric"  ;;     10.04|10.04.1|10.04.2|10.04.3|10.04.4|10.04.5 )  release= "Lucid"  ;;     10.10 )  release= "Maverick"  ;;     * )  echo  "Not found release"  |exit 0 ;; esacif [ -f  $APT _DIR/SOURCES.LIST ]; THEN&Nbsp;   cp  $APT _dir/sources.list  $APT _dir/sources.list_bak | | exit 1else    echo  "Sources.list dose not exists. Cant ' t modify this files '     exit 0fiecho  ' deb http:// mirrors.ustc.edu.cn/ubuntu/  $RELEASE  main restricted universe multiversedeb http ://mirrors.ustc.edu.cn/ubuntu/  $RELEASE-security main restricted universe  multiversedeb http://mirrors.ustc.edu.cn/ubuntu/  $RELEASE-updates main restricted  universe multiversedeb http://mirrors.ustc.edu.cn/ubuntu/  $RELEASE-proposed main  restricted universe multiversedeb http://mirrors.ustc.edu.cn/ubuntu/  $RELEASE-backports  main restricted universe multiversedeb-src http://mirrors.ustc.edu.cn/ubuntu/ $ Release main restricted universe multiversedeb-src http://mirrors.ustc.edu.cn/ubuntu/  $RELEASE-security main restricted universe  multiversedeb-src http://mirrors.ustc.edu.cn/ubuntu/  $RELEASE-updates main restricted  universe multiversedeb-src http://mirrors.ustc.edu.cn/ubuntu/  $RELEASE-proposed main  restricted universe multiversedeb-src http://mirrors.ustc.edu.cn/ubuntu/ $ Release-backports main restricted universe multiverse " >  $APT _dir/ sources.listecho  "Change sources.list sucessfully"


This article is from the "Smurf Linux ops" blog, so be sure to keep this source http://jin771998569.blog.51cto.com/2147853/1564161

Modify various versions of Ubuntu source

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.