首页 > 代码库 > 修改ubuntu各个版本源
修改ubuntu各个版本源
请使用root 执行改脚本 #!/bin/bash APT_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 ;; esac if [ -f $APT_DIR/sources.list ]; then cp $APT_DIR/sources.list $APT_DIR/sources.list_bak ||exit 1 else echo "sources.list dose not exists.Cant‘t modify this files" exit 0 fi echo "deb http://mirrors.ustc.edu.cn/ubuntu/ $RELEASE main restricted universe multiverse deb http://mirrors.ustc.edu.cn/ubuntu/ $RELEASE-security main restricted universe multiverse deb http://mirrors.ustc.edu.cn/ubuntu/ $RELEASE-updates main restricted universe multiverse deb http://mirrors.ustc.edu.cn/ubuntu/ $RELEASE-proposed main restricted universe multiverse deb http://mirrors.ustc.edu.cn/ubuntu/ $RELEASE-backports main restricted universe multiverse deb-src http://mirrors.ustc.edu.cn/ubuntu/ $RELEASE main restricted universe multiverse deb-src http://mirrors.ustc.edu.cn/ubuntu/ $RELEASE-security main restricted universe multiverse deb-src http://mirrors.ustc.edu.cn/ubuntu/ $RELEASE-updates main restricted universe multiverse deb-src http://mirrors.ustc.edu.cn/ubuntu/ $RELEASE-proposed main restricted universe multiverse deb-src http://mirrors.ustc.edu.cn/ubuntu/ $RELEASE-backports main restricted universe multiverse" > $APT_DIR/sources.list echo "Change sources.list sucessfully"
本文出自 “Smurf Linux运维” 博客,请务必保留此出处http://jin771998569.blog.51cto.com/2147853/1564161
修改ubuntu各个版本源
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。